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

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