This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [PATCH]: add set/show debug, move gdb debugging flags into it
> I'm perfectly willing to document them, but personally, i don't think
> they *should* be documented.
I cannot disagree more. I think there should be no undocumented
commands. There are at least two good reasons for that:
- You never know how useful can a command turn out to be, for
someone, somewhere. What you devise as the sneakiest, dirtiest,
for-wizards-only trick, might well enough turn out to be the
hottest feature on the block, if someone finds a creative way to
use it in some situations.
- We, the maintainers of GDB, need a quick way of finding out about
the debugging features when we need them. GDB is a very large
program, and it's unreasonable to expect every maintainer to know
every command on every architecture. And new maintainers are
joining the ranks from time to time.
> In general, with those debug commands, if you can't figure out what
> they do based on the one sentence docstring, you shouldn't be touching
> them.
There's no efficient means in GDB to search the available commands
using the doc strings. There's nothing like Emacs' apropos or finder
commands (or at least I don't know about them--perhaps they are
undocumented ;-). Heck, the "help" command doesn't even
auto-complete!
This makes the manual the only way to find about commands pertinent to
a given subject (assuming it's indexed appropriately).
> It's hard to say more about what "target debugging" is, except that it
> enables printing of target debug info.
Give a couple of examples. Show sample output. Describe one or two
cases where you'd need such a command. (After all, you worked on it
because you needed to use it, right?) This is usually enough info,
since we are talking about commands for GDB maintainers.
> They shouldn't find out they exist, unless specifically instructed by
> someone.
Who would that someone be? I don't have anyone to instruct me how to
debug GDB, and I don't think the good-willing people here have enough
time to do that. I only have the manual, the sources, Grep and etags.
In any case, IMHO using the docs locally is a much more efficient way
of solving problems than asking on the net.