keiths / rpms / gdb

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