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

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