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

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