keiths / rpms / gdb

Forked from rpms/gdb 9 days ago
Clone
fd47e2f
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
fd47e2f
From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova@redhat.com>
fd47e2f
Date: Mon, 10 Jan 2022 13:00:50 +0100
fd47e2f
Subject: gdb-rhbz2024875-expand-documentation-for-debuginfod.patch
fd47e2f
fd47e2f
;;Backport upstream commit from Aaron Merey
fd47e2f
;;3ea44f21299 gdb.texinfo: Expand documentation for debuginfod
fd47e2f
fd47e2f
gdb.texinfo: Expand documentation for debuginfod
fd47e2f
fd47e2f
Add section describing GDB's usage of debuginfod.
fd47e2f
fd47e2f
Refer to this new section in the description of the '--with-debuginfod'
fd47e2f
configure option.
fd47e2f
fd47e2f
Mention debuginfod in the 'Separate Debug Files' section.
fd47e2f
fd47e2f
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
fd47e2f
--- a/gdb/doc/gdb.texinfo
fd47e2f
+++ b/gdb/doc/gdb.texinfo
fd47e2f
@@ -184,6 +184,7 @@ software in general.  We will miss him.
fd47e2f
                                  the operating system
fd47e2f
 * Trace File Format::		GDB trace file format
fd47e2f
 * Index Section Format::        .gdb_index section format
fd47e2f
+* Debuginfod::                  Download debugging resources with @code{debuginfod}
fd47e2f
 * Man Pages::			Manual pages
fd47e2f
 * Copying::			GNU General Public License says
fd47e2f
                                 how you can copy and share GDB
fd47e2f
@@ -21373,7 +21374,9 @@ For the ``build ID'' method, @value{GDBN} looks in the
fd47e2f
 a file named @file{@var{nn}/@var{nnnnnnnn}.debug}, where @var{nn} are the
fd47e2f
 first 2 hex characters of the build ID bit string, and @var{nnnnnnnn}
fd47e2f
 are the rest of the bit string.  (Real build ID strings are 32 or more
fd47e2f
-hex characters, not 10.)
fd47e2f
+hex characters, not 10.)  @value{GDBN} can automatically query
fd47e2f
+@code{debuginfod} servers using build IDs in order to download separate debug
fd47e2f
+files that cannot be found locally.  For more information see @ref{Debuginfod}.
fd47e2f
 @end itemize
fd47e2f
 
fd47e2f
 So, for example, suppose you ask @value{GDBN} to debug
fd47e2f
@@ -21394,6 +21397,10 @@ debug information files, in the indicated order:
fd47e2f
 @file{/usr/lib/debug/usr/bin/ls.debug}.
fd47e2f
 @end itemize
fd47e2f
 
fd47e2f
+If the debug file still has not been found and @code{debuginfod}
fd47e2f
+(@pxref{Debuginfod}) is enabled, @value{GDBN} will attempt to download the
fd47e2f
+file from @code{debuginfod} servers.
fd47e2f
+
fd47e2f
 @anchor{debug-file-directory}
fd47e2f
 Global debugging info directories default to what is set by @value{GDBN}
fd47e2f
 configure option @option{--with-separate-debug-dir}.  During @value{GDBN} run
fd47e2f
@@ -38746,12 +38753,12 @@ Use the curses library instead of the termcap library, for text-mode
fd47e2f
 terminal operations.
fd47e2f
 
fd47e2f
 @item --with-debuginfod
fd47e2f
-Build @value{GDBN} with libdebuginfod, the debuginfod client library.
fd47e2f
-Used to automatically fetch source files and separate debug files from
fd47e2f
-debuginfod servers using the associated executable's build ID. Enabled
fd47e2f
-by default if libdebuginfod is installed and found at configure time.
fd47e2f
-debuginfod is packaged with elfutils, starting with version 0.178. You
fd47e2f
-can get the latest version from `https://sourceware.org/elfutils/'.
fd47e2f
+Build @value{GDBN} with @file{libdebuginfod}, the @code{debuginfod} client
fd47e2f
+library.  Used to automatically fetch ELF, DWARF and source files from
fd47e2f
+@code{debuginfod} servers using build IDs associated with any missing
fd47e2f
+files.  Enabled by default if @file{libdebuginfod} is installed and found
fd47e2f
+at configure time.  For more information regarding @code{debuginfod} see
fd47e2f
+@ref{Debuginfod}.
fd47e2f
 
fd47e2f
 @item --with-libunwind-ia64
fd47e2f
 Use the libunwind library for unwinding function call stack on ia64
fd47e2f
@@ -47012,6 +47019,82 @@ switch (die->tag)
fd47e2f
   @}
fd47e2f
 @end smallexample
fd47e2f
 
fd47e2f
+@node Debuginfod
fd47e2f
+@appendix Download debugging resources with Debuginfod
fd47e2f
+@cindex debuginfod
fd47e2f
+
fd47e2f
+@code{debuginfod} is an HTTP server for distributing ELF, DWARF and source
fd47e2f
+files.
fd47e2f
+
fd47e2f
+With the @code{debuginfod} client library, @file{libdebuginfod}, @value{GDBN}
fd47e2f
+can query servers using the build IDs associated with missing debug info,
fd47e2f
+executables and source files in order to download them on demand.
fd47e2f
+
fd47e2f
+For instructions on building @value{GDBN} with @file{libdebuginfod},
fd47e2f
+@pxref{Configure Options,,--with-debuginfod}.  @code{debuginfod} is packaged
fd47e2f
+with @code{elfutils}, starting with version 0.178.  See
fd47e2f
+@uref{https://sourceware.org/elfutils/Debuginfod.html} for more information
fd47e2f
+regarding @code{debuginfod}.
fd47e2f
+
fd47e2f
+@menu
fd47e2f
+* Debuginfod Settings::		Configuring debuginfod with @value{GDBN}
fd47e2f
+@end menu
fd47e2f
+
fd47e2f
+@node Debuginfod Settings
fd47e2f
+@section Debuginfod Settings
fd47e2f
+
fd47e2f
+@value{GDBN} provides the following commands for configuring @code{debuginfod}.
fd47e2f
+
fd47e2f
+@table @code
fd47e2f
+@kindex set debuginfod
fd47e2f
+@anchor{set debuginfod}
fd47e2f
+@item set debuginfod
fd47e2f
+@itemx set debuginfod on
fd47e2f
+@cindex enable debuginfod
fd47e2f
+@value{GDBN} will attempt to query @code{debuginfod} servers when missing debug
fd47e2f
+info or source files.
fd47e2f
+
fd47e2f
+@item set debuginfod off
fd47e2f
+@value{GDBN} will not attempt to query @code{debuginfod} servers when missing
fd47e2f
+debug info or source files.  By default, @code{debuginfod} is set to @code{off}
fd47e2f
+for non-interactive sessions.
fd47e2f
+
fd47e2f
+@item set debuginfod ask
fd47e2f
+@value{GDBN} will prompt the user to enable or disable @code{debuginfod} before
fd47e2f
+attempting to perform the next query.  By default, @code{debuginfod} is set to
fd47e2f
+@code{ask} for interactive sessions.
fd47e2f
+
fd47e2f
+@kindex show debuginfod status
fd47e2f
+@item show debuginfod status
fd47e2f
+Show whether @code{debuginfod} is set to @code{on}, @code{off} or @code{ask}.
fd47e2f
+
fd47e2f
+@kindex set debuginfod urls
fd47e2f
+@cindex configure debuginfod URLs
fd47e2f
+@item set debuginfod urls
fd47e2f
+@itemx set debuginfod urls @var{urls}
fd47e2f
+Set the space-separated list of URLs that @code{debuginfod} will attempt to
fd47e2f
+query.  Only @code{http://}, @code{https://} and @code{file://} protocols
fd47e2f
+should be used.  The default value of @code{debuginfod urls} is copied from
fd47e2f
+the @var{DEBUGINFOD_URLS} environment variable.
fd47e2f
+
fd47e2f
+@kindex show debuginfod urls
fd47e2f
+@item show debuginfod urls
fd47e2f
+Display the list of URLs that @code{debuginfod} will attempt to query.
fd47e2f
+
fd47e2f
+@kindex set debuginfod verbose
fd47e2f
+@cindex debuginfod verbosity
fd47e2f
+@item set debuginfod verbose
fd47e2f
+@itemx set debuginfod verbose @var{n}
fd47e2f
+Enable or disable @code{debuginfod}-related output.  Use a non-zero value
fd47e2f
+to enable and @code{0} to disable.  @code{debuginfod} output is shown by
fd47e2f
+default.
fd47e2f
+
fd47e2f
+@kindex show debuginfod verbose
fd47e2f
+@item show debuginfod verbose
fd47e2f
+Show the current verbosity setting.
fd47e2f
+
fd47e2f
+@end table
fd47e2f
+
fd47e2f
 @node Man Pages
fd47e2f
 @appendix Manual pages
fd47e2f
 @cindex Man pages