From patchwork Tue Jun 10 07:02:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mingjie Xing X-Patchwork-Id: 1410 Received: (qmail 17966 invoked by alias); 10 Jun 2014 07:03:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 17957 invoked by uid 89); 10 Jun 2014 07:03:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f174.google.com Received: from mail-ig0-f174.google.com (HELO mail-ig0-f174.google.com) (209.85.213.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 10 Jun 2014 07:03:11 +0000 Received: by mail-ig0-f174.google.com with SMTP id h3so4777709igd.7 for ; Tue, 10 Jun 2014 00:03:10 -0700 (PDT) X-Received: by 10.42.88.135 with SMTP id c7mr25403116icm.46.1402383789932; Tue, 10 Jun 2014 00:03:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.20.169 with HTTP; Tue, 10 Jun 2014 00:02:49 -0700 (PDT) In-Reply-To: References: <831tuy2kzi.fsf@gnu.org> <83ioo91nnk.fsf@gnu.org> From: Mingjie Xing Date: Tue, 10 Jun 2014 15:02:49 +0800 Message-ID: Subject: Re: [patch] Share options between info and man page To: Eli Zaretskii Cc: gdb-patches@sourceware.org X-IsSubscribed: yes Sorry for the missing patch. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index a0fb66d..b9675af 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -921,6 +921,8 @@ in sequential order. The order makes a difference when the @node File Options @subsection Choosing Files +@c man begin OPTIONS gdb + When @value{GDBN} starts, it reads any arguments other than options as specifying an executable file and core file (or process ID). This is the same as if the arguments were specified by the @samp{-se} and @@ -945,11 +947,25 @@ them, so long as enough of the option is present to be unambiguous. (If you prefer, you can flag option arguments with @samp{--} rather than @samp{-}, though we illustrate the more usual convention.) +@ifset man +All the options and command line arguments you give are processed +in sequential order. The order makes a difference when the @option{-x} +option is used. +@end ifset + @c NOTE: the @cindex entries here use double dashes ON PURPOSE. This @c way, both those who look for -foo and --foo in the index, will find @c it. @table @code +@ifset man +@item -help +@itemx -h +@cindex @code{--help} +@cindex @code{-h} +List all options, with brief explanations. +@end ifset + @item -symbols @var{file} @itemx -s @var{file} @cindex @code{--symbols} @@ -1034,9 +1050,13 @@ This makes startup slower, but makes future operations faster. @end table +@c man end + @node Mode Options @subsection Choosing Modes +@c man begin OPTIONS gdb + You can run @value{GDBN} in various alternative modes---for example, in batch mode or quiet mode. @@ -1280,6 +1300,8 @@ important when reporting @value{GDBN} bugs (@pxref{GDB Bugs}). @end table +@c man end + @node Startup @subsection What @value{GDBN} Does During Startup @cindex @value{GDBN} startup @@ -1374,7 +1396,6 @@ port of @value{GDBN} uses the standard name, but if it finds a @file{gdb.ini} file in your home directory, it warns you about that and suggests to rename the file to the standard name. - @node Quitting GDB @section Quitting @value{GDBN} @cindex exiting @value{GDBN} @@ -39837,113 +39858,7 @@ as the @code{gdb} entry in the @code{info} program. @end ifset @c man end -@c man begin OPTIONS gdb -Any arguments other than options specify an executable -file and core file (or process ID); that is, the first argument -encountered with no -associated option flag is equivalent to a @option{-se} option, and the second, -if any, is equivalent to a @option{-c} option if it's the name of a file. -Many options have -both long and short forms; both are shown here. The long forms are also -recognized if you truncate them, so long as enough of the option is -present to be unambiguous. (If you prefer, you can flag option -arguments with @option{+} rather than @option{-}, though we illustrate the -more usual convention.) - -All the options and command line arguments you give are processed -in sequential order. The order makes a difference when the @option{-x} -option is used. - -@table @env -@item -help -@itemx -h -List all options, with brief explanations. - -@item -symbols=@var{file} -@itemx -s @var{file} -Read symbol table from file @var{file}. - -@item -write -Enable writing into executable and core files. - -@item -exec=@var{file} -@itemx -e @var{file} -Use file @var{file} as the executable file to execute when -appropriate, and for examining pure data in conjunction with a core -dump. - -@item -se=@var{file} -Read symbol table from file @var{file} and use it as the executable -file. - -@item -core=@var{file} -@itemx -c @var{file} -Use file @var{file} as a core dump to examine. - -@item -command=@var{file} -@itemx -x @var{file} -Execute @value{GDBN} commands from file @var{file}. - -@item -ex @var{command} -Execute given @value{GDBN} @var{command}. - -@item -directory=@var{directory} -@itemx -d @var{directory} -Add @var{directory} to the path to search for source files. - -@item -nh -Do not execute commands from @file{~/.gdbinit}. - -@item -nx -@itemx -n -Do not execute commands from any @file{.gdbinit} initialization files. - -@item -quiet -@itemx -q -``Quiet''. Do not print the introductory and copyright messages. These -messages are also suppressed in batch mode. - -@item -batch -Run in batch mode. Exit with status @code{0} after processing all the command -files specified with @option{-x} (and @file{.gdbinit}, if not inhibited). -Exit with nonzero status if an error occurs in executing the @value{GDBN} -commands in the command files. - -Batch mode may be useful for running @value{GDBN} as a filter, for example to -download and run a program on another computer; in order to make this -more useful, the message - -@smallexample -Program exited normally. -@end smallexample - -@noindent -(which is ordinarily issued whenever a program running under @value{GDBN} control -terminates) is not issued when running in batch mode. - -@item -cd=@var{directory} -Run @value{GDBN} using @var{directory} as its working directory, -instead of the current directory. - -@item -fullname -@itemx -f -Emacs sets this option when it runs @value{GDBN} as a subprocess. It tells -@value{GDBN} to output the full file name and line number in a standard, -recognizable fashion each time a stack frame is displayed (which -includes each time the program stops). This recognizable format looks -like two @samp{\032} characters, followed by the file name, line number -and character position separated by colons, and a newline. The -Emacs-to-@value{GDBN} interface program uses the two @samp{\032} -characters as a signal to display the source code for the frame. - -@item -b @var{bps} -Set the line speed (baud rate or bits per second) of any serial -interface used by @value{GDBN} for remote debugging. - -@item -tty=@var{device} -Run using @var{device} for your program's standard input and output. -@end table -@c man end +@xref{Invoking GDB}, for options. @c man begin SEEALSO gdb @ifset man