From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20215 invoked by alias); 22 Jun 2013 11:23:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 20198 invoked by uid 89); 22 Jun 2013 11:23:25 -0000 X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL,TW_DB,TW_XD autolearn=no version=3.3.1 Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 22 Jun 2013 11:23:22 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MOS00A00KV4FG00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Sat, 22 Jun 2013 14:23:19 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MOS00AQRKYU0L80@a-mtaout22.012.net.il>; Sat, 22 Jun 2013 14:23:19 +0300 (IDT) Date: Sat, 22 Jun 2013 11:31:00 -0000 From: Eli Zaretskii Subject: Re: regroup --help text in --help) In-reply-to: <51681C92.4000502@redhat.com> To: Pedro Alves Cc: tromey@redhat.com, dje@google.com, brobecker@adacore.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83txkql77v.fsf@gnu.org> References: <83r4jaynqq.fsf@gnu.org> <514B4AC3.1090103@redhat.com> <83zjxwy4ux.fsf@gnu.org> <20130321191051.GF5447@adacore.com> <83r4j8y1kh.fsf@gnu.org> <20130321203919.GG5447@adacore.com> <87r4j8zd0k.fsf@fleche.redhat.com> <83ehf85u7x.fsf@gnu.org> <83wqsbadfe.fsf@gnu.org> <20836.17485.525118.795474@ruffy2.mtv.corp.google.com> <83txnfa9m7.fsf@gnu.org> <51645982.8050904@redhat.com> <87k3oamlqy.fsf@fleche.redhat.com> <51658BC9.6080001@redhat.com> <878v4qmc14.fsf@fleche.redhat.com> <83eheg9lbr.fsf@gnu.org> <83bo9k9ifl.fsf@gnu.org> <51681C92.4000502@redhat.com> X-SW-Source: 2013-06/txt/msg00629.txt.bz2 > Date: Fri, 12 Apr 2013 15:39:14 +0100 > From: Pedro Alves > CC: tromey@redhat.com, dje@google.com, brobecker@adacore.com, > gdb-patches@sourceware.org > > On 04/12/2013 11:01 AM, Eli Zaretskii wrote: > >> Date: Fri, 12 Apr 2013 11:58:48 +0300 > >> From: Eli Zaretskii > >> Cc: palves@redhat.com, dje@google.com, brobecker@adacore.com, gdb-patches@sourceware.org > >> > >> I will take a shot on regrouping the --help text later. > > > > Howe about the following (if accepted, I will write a patch to > > implement this): > > This is great. Many thanks. > > > > > This is the GNU debugger. Usage: > > > > gdb [options] [executable-file [core-file or process-id]] > > gdb [options] --args executable-file [inferior-arguments ...] > > > > Selection of debuggee and its files: > > > > --args Arguments after executable-file are passed to inferior. > > --core=COREFILE Analyze the core dump COREFILE. > > --exec=EXECFILE Use EXECFILE as the executable. > > --pid=PID Attach to running process PID. > > --directory=DIR Search for source files in DIR. > > --se=FILE Use FILE as symbol file and executable file. > > --symbols=SYMFILE Read symbols from SYMFILE. > > --readnow Fully read symbol files on first access. > > --write Set writing into executable and core files. > > > > Initial commands and command files: > > > > --command=FILE, -x Execute GDB commands from FILE. > > --init-command=FILE, -ix > > Like -x but execute commands before loading inferior. > > --eval-command=COMMAND, -ex > > Execute a single GDB command. > > May be used multiple times and in conjunction > > with --command. > > --init-eval-command=COMMAND, -iex > > Like -ex but before loading inferior. > > --nh Do not read ~/.gdbinit. > > --nx Do not read any .gdbinit files in any directory. > > > > Output and user interface control: > > > > --epoch Output information used by epoch emacs-GDB interface. > > --fullname Output information used by emacs-GDB interface. > > --interpreter=INTERP > > Select a specific interpreter / user interface > > --tty=TTY Use TTY for input/output by the program being debugged. > > -w Use the GUI interface. > > --nw Do not use the GUI interface. > > --tui Use the text-mode user interface > > --dbx DBX compatibility mode. > > --xdb XDB compatibility mode. > > --quiet Do not print version number on startup. > > > > Miscellaneous options: > > > > -b BAUDRATE Set serial port baud rate used for remote debugging. > > --batch Exit after processing options. > > --batch-silent Like --batch, but suppress all gdb stdout output. > > --return-child-result > > GDB exit code will be the child's exit code. > > --cd=DIR Change current directory to DIR. > > -l TIMEOUT Set timeout in seconds for remote debugging. > > > > --configuration Print details about GDB configuration and then exit. > > --help Print this message and then exit. > > --version Print version information and then exit. > > > > I'd suggest splitting the miscellaneous section as: > > Operating modes: > > --batch Exit after processing options. > --batch-silent Like --batch, but suppress all gdb stdout output. > --return-child-result > GDB exit code will be the child's exit code. > > --configuration Print details about GDB configuration and then exit. > --help Print this message and then exit. > --version Print version information and then exit. > > Remote debugging options: > > -b BAUDRATE Set serial port baud rate used for remote debugging. > -l TIMEOUT Set timeout in seconds for remote debugging. > > Other options: > > --cd=DIR Change current directory to DIR. Long time ago, but not forgotten. The final patch appears below. I will commit it in a few days, if no one objects. 2013-06-22 Eli Zaretskii * main.c (print_gdb_help): Regroup options in the --help text. See http://sourceware.org/ml/gdb-patches/2013-04/msg00362.html for the relevant discussions. Index: gdb/main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.125 diff -u -p -r1.125 main.c --- gdb/main.c 22 Apr 2013 16:46:15 -0000 1.125 +++ gdb/main.c 22 Jun 2013 11:22:40 -0000 @@ -1081,59 +1081,48 @@ print_gdb_help (struct ui_file *stream) get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit); + /* Note: The options in the list below are only approximately sorted + in the alphabetical order, so as to group closely related options + together. */ fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ gdb [options] --args executable-file [inferior-arguments ...]\n\n\ -Options:\n\n\ "), stream); fputs_unfiltered (_("\ +Selection of debuggee and its files:\n\n\ --args Arguments after executable-file are passed to inferior\n\ + --core=COREFILE Analyze the core dump COREFILE.\n\ + --exec=EXECFILE Use EXECFILE as the executable.\n\ + --pid=PID Attach to running process PID.\n\ + --directory=DIR Search for source files in DIR.\n\ + --se=FILE Use FILE as symbol file and executable file.\n\ + --symbols=SYMFILE Read symbols from SYMFILE.\n\ + --readnow Fully read symbol files on first access.\n\ + --write Set writing into executable and core files.\n\n\ "), stream); fputs_unfiltered (_("\ - -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ - --batch Exit after processing options.\n\ - --batch-silent As for --batch, but suppress all gdb stdout output.\n\ - --return-child-result\n\ - GDB exit code will be the child's exit code.\n\ - --cd=DIR Change current directory to DIR.\n\ +Initial commands and command files:\n\n\ --command=FILE, -x Execute GDB commands from FILE.\n\ + --init-command=FILE, -ix\n\ + Like -x but execute commands before loading inferior.\n\ --eval-command=COMMAND, -ex\n\ Execute a single GDB command.\n\ May be used multiple times and in conjunction\n\ with --command.\n\ - --init-command=FILE, -ix Like -x but execute it before loading inferior.\n\ - --init-eval-command=COMMAND, -iex Like -ex but before loading inferior.\n\ - --core=COREFILE Analyze the core dump COREFILE.\n\ - --pid=PID Attach to running process PID.\n\ + --init-eval-command=COMMAND, -iex\n\ + Like -ex but before loading inferior.\n\ + --nh Do not read ~/.gdbinit.\n\ + --nx Do not read any .gdbinit files in any directory.\n\n\ "), stream); fputs_unfiltered (_("\ - --dbx DBX compatibility mode.\n\ - --directory=DIR Search for source files in DIR.\n\ - --exec=EXECFILE Use EXECFILE as the executable.\n\ +Output and user interface control:\n\n\ --fullname Output information used by emacs-GDB interface.\n\ - --help Print this message.\n\ -"), stream); - fputs_unfiltered (_("\ --interpreter=INTERP\n\ Select a specific interpreter / user interface\n\ -"), stream); - fputs_unfiltered (_("\ - -l TIMEOUT Set timeout in seconds for remote debugging.\n\ - --nw Do not use a window interface.\n\ - --nx Do not read any "), stream); - fputs_unfiltered (gdbinit, stream); - fputs_unfiltered (_(" files.\n\ - --nh Do not read "), stream); - fputs_unfiltered (gdbinit, stream); - fputs_unfiltered (_(" file from home directory.\n\ - --quiet Do not print version number on startup.\n\ - --readnow Fully read symbol files on first access.\n\ -"), stream); - fputs_unfiltered (_("\ - --se=FILE Use FILE as symbol file and executable file.\n\ - --symbols=SYMFILE Read symbols from SYMFILE.\n\ --tty=TTY Use TTY for input/output by the program being debugged.\n\ + -w Use the GUI interface.\n\ + --nw Do not use the GUI interface.\n\ "), stream); #if defined(TUI) fputs_unfiltered (_("\ @@ -1141,11 +1130,24 @@ Options:\n\n\ "), stream); #endif 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\ + --dbx DBX compatibility mode.\n\ --xdb XDB compatibility mode.\n\ + --quiet Do not print version number on startup.\n\n\ +"), stream); + fputs_unfiltered (_("\ +Operating modes:\n\n\ + --batch Exit after processing options.\n\ + --batch-silent Like --batch, but suppress all gdb stdout output.\n\ + --return-child-result\n\ + GDB exit code will be the child's exit code.\n\ + --configuration Print details about GDB configuration and then exit.\n\ + --help Print this message and then exit.\n\ + --version Print version information and then exit.\n\n\ +Remote debugging options:\n\n\ + -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ + -l TIMEOUT Set timeout in seconds for remote debugging.\n\n\ +Other options:\n\n\ + --cd=DIR Change current directory to DIR.\n\ "), stream); fputs_unfiltered (_("\n\ At startup, GDB reads the following init files and executes their commands:\n\