This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] clean up output of "info set" command.


Pedro Alves wrote:
On Friday 11 February 2011 21:17:08, Tom Tromey wrote:
"Michael" == Michael Snyder <msnyder@vmware.com> writes:
Pedro> Isn't there a property of the command we could check
Pedro> instead of hardcoding specific command names?

Michael> I'm open to suggestions.  The only property I can think of is that
Michael> there is no corresponding entry in "setlist".  I could search
Michael> setlist every time...

You could stick a new flag on the command object.

Yeah. You may even be able to set the flag from within the add_setshow_... functions and friends. The flag could mean "this show command shows something that is settable in some way" (or the reverse).

Or there is cmd_cfunc_eq, which is used for a similar purpose in some
places.  I don't think this is super, but OTOH it isn't any worse than
existing code.

I think we shouldn't allow ourselves to broadcast bad design
when it's easy not to. The function Michael touched is within
gdb/cli/cli-setshow.c. I'd prefer to keep this and the other
core command files clean of specific knowledge of any specific commands their clients register.


I notice that "info set" is basically an alias of "show".
Does the change make sense in the context of "show",
or should "show" keep showing everything showable under
the show command?  "show foo|bar|..."


They're synonyms. But I still don't think that "show copying" is at all useful when presented in the middle of dozens of other show commands.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]