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

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