This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Display configuration details in --help
- From: Pedro Alves <palves at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, Tom Tromey <tromey at redhat dot com>, Joel Brobecker <brobecker at adacore dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 09 Apr 2013 19:10:10 +0100
- Subject: Re: [PATCH] Display configuration details in --help
- References: <83r4jaynqq dot fsf at gnu dot org> <CADPb22R4o4gkQk8oeqGvmWZerVf7gdkw8XOKz9mYxD6ubFPRig at mail dot gmail dot com> <514B4AC3 dot 1090103 at redhat dot com> <83zjxwy4ux dot fsf at gnu dot org> <20130321191051 dot GF5447 at adacore dot com> <83r4j8y1kh dot fsf at gnu dot org> <20130321203919 dot GG5447 at adacore dot com> <87r4j8zd0k dot fsf at fleche dot redhat dot com> <83ehf85u7x dot fsf at gnu dot org> <83wqsbadfe dot fsf at gnu dot org> <20836 dot 17485 dot 525118 dot 795474 at ruffy2 dot mtv dot corp dot google dot com> <83txnfa9m7 dot fsf at gnu dot org> <CADPb22SQaWrBd4MOmMqFaAMc=KnX15hd=be3Ta_u3wGg=HGmXQ at mail dot gmail dot com>
On 04/09/2013 06:53 PM, Doug Evans wrote:
> On Tue, Apr 9, 2013 at 10:37 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>>> > fputs_unfiltered (_("\
>>> > --version Print version information and then exit.\n\
>>> > + --configuration Print details about GDB configuration and then exit.\n\
>>> > -w Use a window interface.\n\
>>> > --write Set writing into executable and core files.\n\
>>> > --xdb XDB compatibility mode.\n\
>>>
>>> The options here are (mostly) sorted alphabetically.
>>
>> Except where they aren't:
There's a pattern.
>>
>> --args Arguments after executable-file are passed to inferior
>> -b BAUDRATE Set serial port baud rate used for remote debugging.
>> --batch Exit after processing options.
>> --batch-silent As for --batch, but suppress all gdb stdout output.
>> >>> --return-child-result
Related to --batch.
>> GDB exit code will be the child's exit code.
>> --cd=DIR Change current directory to DIR.
>> --command=FILE, -x Execute GDB commands from FILE.
>> >>> --eval-command=COMMAND, -ex
>> Execute a single GDB command.
>> May be used multiple times and in conjunction
>> with --command.
>> >>> --init-command=FILE, -ix Like -x but execute it before loading inferior.
>> >>> --init-eval-command=COMMAND, -iex Like -ex but before loading inferior.
All these are related to --command.
>> >>> --core=COREFILE Analyze the core dump COREFILE.
Remove the ones above related to --command, and this one's
actually in place.
>> >>> --pid=PID Attach to running process PID.
--pid is kind of a cousin of --core, due to how BAR is
handled in "gdb FOO BAR".
>> --dbx DBX compatibility mode.
>> --directory=DIR Search for source files in DIR.
>> --epoch Output information used by epoch emacs-GDB interface.
>> --exec=EXECFILE Use EXECFILE as the executable.
>> --fullname Output information used by emacs-GDB interface.
>> --help Print this message.
>> --interpreter=INTERP
>> Select a specific interpreter / user interface
>> -l TIMEOUT Set timeout in seconds for remote debugging.
>> --nw Do not use a window interface.
>> --nx Do not read .gdbinit file.
>> --quiet Do not print version number on startup.
>> --readnow Fully read symbol files on first access.
>> --se=FILE Use FILE as symbol file and executable file.
>> --symbols=SYMFILE Read symbols from SYMFILE.
>> --tty=TTY Use TTY for input/output by the program being debugged.
>> --version Print version information and then exit.
>> -w Use a window interface.
>> --write Set writing into executable and core files.
>> --xdb XDB compatibility mode.
>>
>> Again, I'm not really wedded to the place where I inserted the new
>> option, but please tell me near which 'c' option to put it instead ;-).
>
> Right after --command works for me.
So if you imagine a right indent in the grouped options, the
list is actually sorted, so that'd break the existing logic. I'd suggest
either right after --version; right after --help; right before --core, or
a wholesale reevaluation of the current grouping (either sort all
alphabetically, or break "Options:" into groups).
--
Pedro Alves