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

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