Blame SOURCES/gdb-rhbz-853071-update-manpages.patch

b94e32
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
b94e32
From: Bruno Larsen <blarsen@redhat.com>
b94e32
Date: Tue, 9 Nov 2021 14:07:26 -0300
b94e32
Subject: gdb-rhbz-853071-update-manpages.patch
b94e32
b94e32
;; Backport manpage update
b94e32
b94e32
[gdb/doc]: Updated manpages to be consistent with help
b94e32
b94e32
Updated manpages to be consistent with help information provided by the
b94e32
binary. The main changes are:
b94e32
b94e32
* Making all long-form options have '--', instead of a single '-';
b94e32
* added most of the missing options to the manpage;
b94e32
* removed the information about using '+' instead of '-', since it
b94e32
  doesn't seem to be supported anymore.
b94e32
b94e32
This also fixes 2 upstream bugs:
b94e32
* https://sourceware.org/bugzilla/show_bug.cgi?id=23965; by adding
b94e32
--args to the manpage
b94e32
* https://sourceware.org/bugzilla/show_bug.cgi?id=10619; by adding the
b94e32
double dashes
b94e32
b94e32
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
b94e32
--- a/gdb/doc/gdb.texinfo
b94e32
+++ b/gdb/doc/gdb.texinfo
b94e32
@@ -47030,14 +47030,7 @@ switch (die->tag)
b94e32
 @c man title gdb The GNU Debugger
b94e32
 
b94e32
 @c man begin SYNOPSIS gdb
b94e32
-gdb [@option{-help}] [@option{-nh}] [@option{-nx}] [@option{-q}]
b94e32
-[@option{-batch}] [@option{-cd=}@var{dir}] [@option{-f}]
b94e32
-[@option{-b}@w{ }@var{bps}]
b94e32
-    [@option{-tty=}@var{dev}] [@option{-s} @var{symfile}]
b94e32
-[@option{-e}@w{ }@var{prog}] [@option{-se}@w{ }@var{prog}]
b94e32
-[@option{-c}@w{ }@var{core}] [@option{-p}@w{ }@var{procID}]
b94e32
-    [@option{-x}@w{ }@var{cmds}] [@option{-d}@w{ }@var{dir}]
b94e32
-[@var{prog}|@var{prog} @var{procID}|@var{prog} @var{core}]
b94e32
+gdb [OPTIONS] [@var{prog}|@var{prog} @var{procID}|@var{prog} @var{core}]
b94e32
 @c man end
b94e32
 
b94e32
 @c man begin DESCRIPTION gdb
b94e32
@@ -47101,8 +47094,8 @@ Here are some of the most frequently needed @value{GDBN} commands:
b94e32
 
b94e32
 @c pod2man highlights the right hand side of the @item lines.
b94e32
 @table @env
b94e32
-@item break [@var{file}:]@var{function}
b94e32
-Set a breakpoint at @var{function} (in @var{file}).
b94e32
+@item break [@var{file}:][@var{function}|@var{line}]
b94e32
+Set a breakpoint at @var{function} or @var{line} (in @var{file}).
b94e32
 
b94e32
 @item run [@var{arglist}]
b94e32
 Start your program (with @var{arglist}, if specified).
b94e32
@@ -47150,72 +47143,91 @@ as the @code{gdb} entry in the @code{info} program.
b94e32
 Any arguments other than options specify an executable
b94e32
 file and core file (or process ID); that is, the first argument
b94e32
 encountered with no
b94e32
-associated option flag is equivalent to a @option{-se} option, and the second,
b94e32
+associated option flag is equivalent to a @option{--se} option, and the second,
b94e32
 if any, is equivalent to a @option{-c} option if it's the name of a file.
b94e32
 Many options have
b94e32
-both long and short forms; both are shown here.  The long forms are also
b94e32
+both long and abbreviated forms; both are shown here.  The long forms are also
b94e32
 recognized if you truncate them, so long as enough of the option is
b94e32
-present to be unambiguous.  (If you prefer, you can flag option
b94e32
-arguments with @option{+} rather than @option{-}, though we illustrate the
b94e32
-more usual convention.)
b94e32
+present to be unambiguous.
b94e32
+
b94e32
+The abbreviated forms are shown here with @samp{-} and long forms are shown
b94e32
+with @samp{--} to reflect how they are shown in @option{--help}. However,
b94e32
+@value{GDBN} recognizes all of the following conventions for most options:
b94e32
+
b94e32
+@table @code
b94e32
+@item --option=@var{value}
b94e32
+@item --option @var{value}
b94e32
+@item -option=@var{value}
b94e32
+@item -option @var{value}
b94e32
+@item --o=@var{value}
b94e32
+@item --o @var{value}
b94e32
+@item -o=@var{value}
b94e32
+@item -o @var{value}
b94e32
+@end table
b94e32
 
b94e32
 All the options and command line arguments you give are processed
b94e32
 in sequential order.  The order makes a difference when the @option{-x}
b94e32
 option is used.
b94e32
 
b94e32
 @table @env
b94e32
-@item -help
b94e32
+@item --help
b94e32
 @itemx -h
b94e32
 List all options, with brief explanations.
b94e32
 
b94e32
-@item -symbols=@var{file}
b94e32
+@item --symbols=@var{file}
b94e32
 @itemx -s @var{file}
b94e32
-Read symbol table from file @var{file}.
b94e32
+Read symbol table from @var{file}.
b94e32
 
b94e32
-@item -write
b94e32
+@item --write
b94e32
 Enable writing into executable and core files.
b94e32
 
b94e32
-@item -exec=@var{file}
b94e32
+@item --exec=@var{file}
b94e32
 @itemx -e @var{file}
b94e32
-Use file @var{file} as the executable file to execute when
b94e32
+Use @var{file} as the executable file to execute when
b94e32
 appropriate, and for examining pure data in conjunction with a core
b94e32
 dump.
b94e32
 
b94e32
-@item -se=@var{file}
b94e32
-Read symbol table from file @var{file} and use it as the executable
b94e32
+@item --se=@var{file}
b94e32
+Read symbol table from @var{file} and use it as the executable
b94e32
 file.
b94e32
 
b94e32
-@item -core=@var{file}
b94e32
+@item --core=@var{file}
b94e32
 @itemx -c @var{file}
b94e32
-Use file @var{file} as a core dump to examine.
b94e32
+Use @var{file} as a core dump to examine.
b94e32
 
b94e32
-@item -command=@var{file}
b94e32
+@item --command=@var{file}
b94e32
 @itemx -x @var{file}
b94e32
-Execute @value{GDBN} commands from file @var{file}.
b94e32
+Execute @value{GDBN} commands from @var{file}.
b94e32
 
b94e32
+@item --eval-command=@var{command}
b94e32
 @item -ex @var{command}
b94e32
 Execute given @value{GDBN} @var{command}.
b94e32
 
b94e32
-@item -directory=@var{directory}
b94e32
+@item --init-eval-command=@var{command}
b94e32
+@item -iex
b94e32
+Execute @value{GDBN} @var{command} before loading the inferior.
b94e32
+
b94e32
+@item --directory=@var{directory}
b94e32
 @itemx -d @var{directory}
b94e32
 Add @var{directory} to the path to search for source files.
b94e32
 
b94e32
-@item -nh
b94e32
+@item --nh
b94e32
 Do not execute commands from @file{~/.config/gdb/gdbinit},
b94e32
 @file{~/.gdbinit}, @file{~/.config/gdb/gdbearlyinit}, or
b94e32
 @file{~/.gdbearlyinit}
b94e32
 
b94e32
-@item -nx
b94e32
+@item --nx
b94e32
 @itemx -n
b94e32
 Do not execute commands from any @file{.gdbinit} or
b94e32
 @file{.gdbearlyinit} initialization files.
b94e32
 
b94e32
-@item -quiet
b94e32
+@item --quiet
b94e32
+@item --silent
b94e32
 @itemx -q
b94e32
 ``Quiet''.  Do not print the introductory and copyright messages.  These
b94e32
 messages are also suppressed in batch mode.
b94e32
 
b94e32
-@item -batch
b94e32
+@item --batch
b94e32
 Run in batch mode.  Exit with status @code{0} after processing all the command
b94e32
 files specified with @option{-x} (and @file{.gdbinit}, if not inhibited).
b94e32
 Exit with nonzero status if an error occurs in executing the @value{GDBN}
b94e32
@@ -47233,11 +47245,71 @@ Program exited normally.
b94e32
 (which is ordinarily issued whenever a program running under @value{GDBN} control
b94e32
 terminates) is not issued when running in batch mode.
b94e32
 
b94e32
-@item -cd=@var{directory}
b94e32
+@item --batch-silent
b94e32
+Run in batch mode, just like @option{--batch}, but totally silent.  All @value{GDBN}
b94e32
+output is supressed (stderr is unaffected).  This is much quieter than
b94e32
+@option{--silent} and would be useless for an interactive session.
b94e32
+
b94e32
+This is particularly useful when using targets that give @samp{Loading section}
b94e32
+messages, for example.
b94e32
+
b94e32
+Note that targets that give their output via @value{GDBN}, as opposed to writing
b94e32
+directly to @code{stdout}, will also be made silent.
b94e32
+
b94e32
+@item --args @var{prog} [@var{arglist}]
b94e32
+Change interpretation of command line so that arguments following this
b94e32
+option are passed as arguments to the inferior.  As an example, take
b94e32
+the following command:
b94e32
+
b94e32
+@smallexample
b94e32
+gdb ./a.out -q
b94e32
+@end smallexample
b94e32
+
b94e32
+@noindent
b94e32
+It would start @value{GDBN} with @option{-q}, not printing the introductory message.  On
b94e32
+the other hand, using:
b94e32
+
b94e32
+@smallexample
b94e32
+gdb --args ./a.out -q
b94e32
+@end smallexample
b94e32
+
b94e32
+@noindent
b94e32
+starts @value{GDBN} with the introductory message, and passes the option to the inferior.
b94e32
+
b94e32
+@item --pid=@var{pid}
b94e32
+Attach @value{GDBN} to an already running program, with the PID @var{pid}.
b94e32
+
b94e32
+@item --tui
b94e32
+Open the terminal user interface.
b94e32
+
b94e32
+@item --readnow
b94e32
+Read all symbols from the given symfile on the first access.
b94e32
+
b94e32
+@item --readnever
b94e32
+Do not read symbol files.
b94e32
+
b94e32
+@item --dbx
b94e32
+Run in DBX compatibility mode.
b94e32
+
b94e32
+@item --return-child-result
b94e32
+@value{GDBN}'s exit code will be the same as the child's exit code.
b94e32
+
b94e32
+@item --configuration
b94e32
+Print details about GDB configuration and then exit.
b94e32
+
b94e32
+@item --version
b94e32
+Print version information and then exit.
b94e32
+
b94e32
+@item --cd=@var{directory}
b94e32
 Run @value{GDBN} using @var{directory} as its working directory,
b94e32
 instead of the current directory.
b94e32
 
b94e32
-@item -fullname
b94e32
+@item --data-directory=@var{directory}
b94e32
+@item -D
b94e32
+Run @value{GDBN} using @var{directory} as its data directory.  The data
b94e32
+directory is where @value{GDBN} searches for its auxiliary files.
b94e32
+
b94e32
+@item --fullname
b94e32
 @itemx -f
b94e32
 Emacs sets this option when it runs @value{GDBN} as a subprocess.  It tells
b94e32
 @value{GDBN} to output the full file name and line number in a standard,
b94e32
@@ -47248,11 +47320,14 @@ and character position separated by colons, and a newline.  The
b94e32
 Emacs-to-@value{GDBN} interface program uses the two @samp{\032}
b94e32
 characters as a signal to display the source code for the frame.
b94e32
 
b94e32
-@item -b @var{bps}
b94e32
+@item -b @var{baudrate}
b94e32
 Set the line speed (baud rate or bits per second) of any serial
b94e32
 interface used by @value{GDBN} for remote debugging.
b94e32
 
b94e32
-@item -tty=@var{device}
b94e32
+@item -l @var{timeout}
b94e32
+Set timeout, in seconds, for remote debugging.
b94e32
+
b94e32
+@item --tty=@var{device}
b94e32
 Run using @var{device} for your program's standard input and output.
b94e32
 @end table
b94e32
 @c man end