dwp
package DWARF debugging information
TLDR
SYNOPSIS
dwp [-e executable] [-o output.dwp] [dwo-file...]
DESCRIPTION
dwp (DWARF packaging utility) combines DWARF debugging information from multiple split-DWARF object files (.dwo) into a single package file (.dwp). This is part of the split-DWARF workflow enabled by gcc -gsplit-dwarf or clang -gsplit-dwarf, where the compiler writes most debug data into per-translation-unit .dwo files rather than embedding it in the linked binary.Packaging the .dwo files with dwp keeps debug info distributable as a single file and lets debuggers locate symbols by following the DW_AT_GNU_dwo_name / DW_AT_GNU_dwo_id references stored in the executable.Split DWARF significantly reduces link times and executable sizes while preserving full source-level debugging, which is especially valuable for large C++ codebases.
PARAMETERS
-e executable, --exec executable
Read the list of .dwo files from the DW_AT_GNU_dwo_name attributes inside the given executable or shared library.-o file, --output file
Write the packaged DWARF to file. Defaults to a.dwp if omitted.-v, --verbose
Print the name of each .dwo file as it is added.@file
Read additional command-line arguments (typically .dwo file names) from file, one per line.-h, --help
Display usage information.-V, --version
Print version information.
CAVEATS
Requires split-DWARF compilation (-gsplit-dwarf). The debugger must support the .dwp format (recent GDB and LLDB do). With -e, dwp locates .dwo files using their on-disk paths recorded by the compiler; if the build tree has moved, the .dwo files may not be found unless they sit alongside the executable.
HISTORY
dwp is part of GNU binutils and parallels llvm-dwp in the LLVM project. The split-DWARF format and packaging tool were introduced to address compile/link time and binary size in large C++ projects.
