Debuginfod

From ArchWiki

Debuginfod is a service providing debug information over an HTTP API.

Installation

gdb automatically tries to download debug files if the DEBUGINFOD_URLS environment variable is present, so there is no need to install additional packages.

You can optionally install the debuginfod package which automatically adds DEBUGINFOD_URLS to the environment on login and provides the debuginfod-find(1) utility. This package is required for debuginfod support in delve.

Usage

If the debuginfod package is not installed or you want to set a custom URL, set the environment variable which tells the tooling where to look for debug symbols:

DEBUGINFOD_URLS="https://debuginfod.archlinux.org/"

One can also use https://debuginfod.elfutils.org/ which works as a federated server and queries all available debuginfod servers.

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: What data is actually fetched? Does it download a debug package and extract it to the user's home directory? (Discuss in Talk:Debuginfod)

Merge-arrows-2.pngThis article or section is a candidate for merging with Debugging/Getting traces#Debuginfod.Merge-arrows-2.png

Notes: Duplicate content. (Discuss in Talk:Debuginfod)

Now a debugger can fetch debug symbols without having to install the appropriate debug package.

$ gdb /usr/bin/i3
[...]
Reading symbols from /usr/bin/i3...
Downloading 1.56 MB separate debug info for /usr/bin/i3
Reading symbols from /home/user/.cache/debuginfod_client/29129d26dbe557d2b56daf90327f64f527304dc1/debuginfo...
(gdb)

You can also do for example:

# coredumpctl gdb

And then inside gdb

bt full

and you will have the debug-symbols of the last crashed app in your sysyem.


See debuginfod-find(1) for usage.

Debugger support

Several debuggers support utilizing debuginfod to find debug symbol and source code listing.

Package Status Notes
gdb Supported
delve Supported
KDE Crash Report Supported
valgrind Supported

See also