Debuginfod
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.
libelf, a dependency of gdb, ships with /etc/profile.d/debuginfod.sh
and /etc/profile.d/debuginfod.csh
scripts that set the variable on login, so there is no need to install additional packages.
You can optionally install the debuginfod package which provides the debuginfod-find(1) utility. This package is required for debuginfod support in delve.
Usage
The tooling looks for debug symbols on the debuginfod servers specified in the DEBUGINFOD_URLS
environment variable. The value is a string of a space separated URLs.
For example:
DEBUGINFOD_URLS="https://debuginfod.archlinux.org/"
https://debuginfod.elfutils.org/
which works as a federated server and queries all available debuginfod servers.See debuginfod-find(1) for usage.
Manual download
If one wants to manually retrieve the debug symbols for zstd, along with some source files, one can utilize debuginfod-find:
$ debuginfod-find debuginfo /usr/bin/zstd
/home/user/.cache/debuginfod_client/70e1b456c5813658df6436a3deb71812e75a0267/debuginfo
$ debuginfod-find source /usr/bin/zstd /usr/src/debug/zstd-1.5.2/programs/fileio.c
/home/user/.cache/debuginfod_client/70e1b456c5813658df6436a3deb71812e75a0267/source##usr##src##debug##zstd-1.5.2##programs##fileio.c
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 |