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

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