LinuxCommandLibrary

debuginfod-find

Find debug information files using build IDs

TLDR

Request data based on the build_id

$ debuginfod-find -vv debuginfo [build_id]
copy

SYNOPSIS

debuginfod-find [OPTION...] TYPE BUILD-ID [TYPE BUILD-ID...]

PARAMETERS

--cache-dir=PATH
    Set cache directory (default: $HOME/.cache/debuginfod_client)

--discover=METHOD
    Discovery: fallback (default), all, none

--headers-only
    For debuginfo: download ELF headers + DWARF abbrev only

--list-servers
    Print known debuginfod server URLs

--server=URL
    Add debuginfod server(s); repeatable

--build-id-size=160|256
    Build-ID size in bits (default: 160)

--help
    Display usage summary

--version
    Print version info

DESCRIPTION

debuginfod-find is a client tool for the debuginfod service, an HTTP-based protocol for on-demand retrieval of ELF/DWARF debugging artifacts using build-IDs. Build-IDs are unique SHA-1 or truncated SHA-256 hashes embedded in ELF binaries.

It queries configured debuginfod servers to download requested items like full debuginfo sections, matching executables, source files, debuglink filenames, or symlinks. Files are cached in $HOME/.cache/debuginfod_client (configurable) for reuse by tools like GDB, which auto-invokes it via DEBUGINFOD_URLS.

Servers are discovered dynamically via HTTPS /.well-known/debuginfod endpoints from fallback lists or explicitly set. Multiple type build-id pairs can be requested per invocation. Output is the path to the downloaded/cached file or relevant info.

Ideal for headless environments or when local debuginfo repos are unavailable, reducing distribution size while enabling post-mortem debugging.

CAVEATS

Requires network access and writable cache dir. Build-IDs are 40-hex chars (160-bit). No verification of server authenticity. Use debuginfod-reap for cache cleanup. Servers may reject excessive queries.

SUPPORTED TYPES

debuginfo: full DWARF info
executable: matching binary image
sourcefile: source by object+file+line
debuglink: GNU debuglink filename
symlink: path to debuginfo symlink

ENVIRONMENT VARIABLES

DEBUGINFOD_URLS: space-separated server URLs
DEBUGINFOD_CACHE_PATH: override cache dir
DEBUGINFOD_SOCKET: client socket path

HISTORY

Introduced in elfutils 0.175 (Feb 2019) by Nick Clifton and Mark Wielaard. Evolved with Fedora/RHEL debuginfod infrastructure; supports truncated build-IDs since elfutils 0.186.

SEE ALSO

debuginfod(8), debuginfod-reap(1), gdb(1), eu-readelf(1), eu-unstrip(1)

Copied to clipboard