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

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