From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kQ+FD6nZZmFQAwAAWB0awg (envelope-from ) for ; Wed, 13 Oct 2021 09:05:45 -0400 Received: by simark.ca (Postfix, from userid 112) id 29A281F0BB; Wed, 13 Oct 2021 09:05:45 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B6F111ECEB for ; Wed, 13 Oct 2021 09:05:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BF4E2385843D for ; Wed, 13 Oct 2021 13:05:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF4E2385843D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1634130342; bh=xQ92eftTDvQWMqbHw4u2vFSO3BSMr44Qb0mVCmidseg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=bILVHVDyX6LxUU9mX/wPJTwkGS+owtCWrUQD0xLsOBqrJpuLpDiNUtJswt/b6OGZi PStjYp62XRQCiAvaLCjf68a/v0G423/1La0FpseXUNal58l9SDj8A0heNiMd4Vv3Tv b0BVf/tE0/JdVKTUVjvk3hcSGnaXVrU7d1v0/2CY= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 8078D3858C3A for ; Wed, 13 Oct 2021 13:04:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8078D3858C3A Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-549-3GJBL9pRM3qS7xDWt3BYKA-1; Wed, 13 Oct 2021 09:04:44 -0400 X-MC-Unique: 3GJBL9pRM3qS7xDWt3BYKA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1BB49801FCE for ; Wed, 13 Oct 2021 13:04:43 +0000 (UTC) Received: from blarsen.com (ovpn-116-53.gru2.redhat.com [10.97.116.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D23705DA60; Wed, 13 Oct 2021 13:04:40 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH] [gdb/doc]: Updated manpages to be consistent with help Date: Wed, 13 Oct 2021 10:04:09 -0300 Message-Id: <20211013130409.10711-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Bruno Larsen via Gdb-patches Reply-To: Bruno Larsen Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Updated manpages to be consistent with help information provided by the binary. The main changes are Making all long-form options have '--', instead of a single '-' and added most of the missing options to the manpage. --- gdb/doc/gdb.texinfo | 136 +++++++++++++++++++++++++++++++------------- 1 file changed, 97 insertions(+), 39 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index c156a1d6739..cbf72d20e20 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -47077,14 +47077,7 @@ switch (die->tag) @c man title gdb The GNU Debugger @c man begin SYNOPSIS gdb -gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}] -[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}] -[@option{-b}@w{ }@var{bps}] - [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}] -[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}] -[@option{-c}@w{ }@var{core}] [@option{-p}@w{ }@var{procID}] - [@option{-x}@w{ }@var{cmds}] [@option{-d}@w{ }@var{dir}] -[@var{prog}|@var{prog} @var{procID}|@var{prog} @var{core}] +gdb [OPTIONS] [@var{prog}|@var{prog} @var{procID}|@var{prog} @var{core}] @c man end @c man begin DESCRIPTION gdb @@ -47148,8 +47141,8 @@ Here are some of the most frequently needed @value{GDBN} commands: @c pod2man highlights the right hand side of the @item lines. @table @env -@item break [@var{file}:]@var{function} -Set a breakpoint at @var{function} (in @var{file}). +@item break [@var{file}:][@var{function}|@var{line}] +Set a breakpoint at @var{function} or @var{line} (in @var{file}). @item run [@var{arglist}] Start your program (with @var{arglist}, if specified). @@ -47197,72 +47190,76 @@ as the @code{gdb} entry in the @code{info} program. 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, +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.) +present to be unambiguous. 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 +@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 --symbols=@var{symfile} +@itemx -s @var{symfile} +Read symbol table from file @var{symfile}. -@item -write +@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 +@item --exec=@var{execfile} +@itemx -e @var{execfile} +Use file @var{execfile} as the executable file to execute when appropriate, and for examining pure data in conjunction with a core dump. -@item -se=@var{file} +@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 --core=@var{corefile} +@itemx -c @var{corefile} +Use file @var{corefile} as a core dump to examine. -@item -command=@var{file} +@item --command=@var{file} @itemx -x @var{file} Execute @value{GDBN} commands from file @var{file}. +@item --eval-command=@var{command} @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 --init-eval-command=@var{command} +@item -iex +Execute @value{GDBN} @var{command} before loading the inferior. -@item -nh +@item --directory=@var{DIR} +@itemx -d @var{DIR} +Add @var{DIR} to the path to search for source files. + +@item --nh Do not execute commands from @file{~/.config/gdb/gdbinit}, @file{~/.gdbinit}, @file{~/.config/gdb/gdbearlyinit}, or @file{~/.gdbearlyinit} -@item -nx +@item --nx @itemx -n Do not execute commands from any @file{.gdbinit} or @file{.gdbearlyinit} initialization files. -@item -quiet +@item --quiet +@item --silent @itemx -q ``Quiet''. Do not print the introductory and copyright messages. These messages are also suppressed in batch mode. -@item -batch +@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} @@ -47280,11 +47277,69 @@ Program exited normally. (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, +@item --batch-silent +Run in batch mode, just like @option{--batch}, but totally silent. All @value{GDBN} +output is supressed (stderr is unaffected). This is much quieter than +@option{--silent} and would be useless for an interactive session. + +This is particularly useful when using targets that give 'Loading section' +messages, for example. + +Note that targets that give their ourpur via GDB, as opposed to writting +directly to stdout, will also be made silent. + +@item --args @var{prog} [@var{arglist}] +Change interpretation of command line so that arguments following this +option are passed as arguments to the inferior. As an example, take +the following command: + +@smallexample +gdb ./a.out -q +@end smallexample + +Will start GDB with @option{-q}, not printing the introductory message. On +the other hand, using: + +@smallexample +gdb --args ./a.out -q +@end smallexample + +Starts GDB with the introductory message, and passes the option to the inferior. + +@item --pid=@var{PID} +Attach GDB to an already running program, with the PID @var{PID}. + +@item --tui +Opens the terminal user interface. + +@item --readnow +Read all symbols from the given symfile on the first access. + +@item --readnever +Do not read symbol files. + +@item --dbx +Run in DBX compatibility mode. + +@item --return-child-result +@value{GDBN}'s exit code will be the same as the child's exit code. + +@item --configuration +Prints details about GDB configuration and then exit. + +@item --version +Print version information and then exit. + +@item --cd=@var{DIR} +Run @value{GDBN} using @var{DIR} as its working directory, instead of the current directory. -@item -fullname +@item --data-directory=@var{DIR} +@item -D +Run @value{GDBN} using @var{DIR} as its data directory. The data +directory is where @value{GDBN} searches for its auxiliary files. + +@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, @@ -47295,11 +47350,14 @@ 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} +@item -b @var{BAUDRATE} 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} +@item -l @var{TIMEOUT} +Set timeout, in seconds, for remote debugging. + +@item --tty=@var{device} Run using @var{device} for your program's standard input and output. @end table @c man end -- 2.27.0