Blame SOURCES/gdb-rhbz2024875-expand-documentation-for-debuginfod.patch

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