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

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