This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] add note on command naming to gdbint.texi
Tom Tromey wrote:
"Doug" == Doug Evans <dje@google.com> writes:
Doug> I'd like to add this to the Coding section of gdbint.texi.
Doug> +GDB U/I commands are written @samp{foo-bar}, not @samp{foo_bar}.
I wonder whether we also have a rule about when to use a hyphen versus
when to use a subcommand.
I think it's been semi-random to date (or is that "semi random"? :-) ).
It would make sense to suggest using subcommands if there are going to
be several related commands for which "foo" is a sensible name for the
group. It shouldn't be required though, since for instance the
permissions patch I'm working on has commands "set may-write-registers"
and "set may-insert-breakpoints", but "set may write-registers" is just
going to be mystifying.
The suggestion should also mention the possibility of using "bar" as the
common subcommand prefix, if the grouping is more logical or easier to
remember that way. For instance, I never used to remember whether it
was "set remote-debug" or "set debug-remote", but "debug remote" is easy
because now it's part of the debug group of set commands.
Stan