LLVM-DWARFDUMP(1)
πΈ NAME πΈ
llvm-dwarfdump β dump and verify DWARF debug information. This is the LLVM manual page (LLVM-DWARFDUMP(1)), and yes bestie, it's giving debug-info main character energy π
π οΈ SYNOPSIS π οΈ
Okay so the summoning ritual is literally:
llvm-dwarfdump [options] [filename ...]
π DESCRIPTION π
llvm-dwarfdump parses DWARF sections in object files, archives, and .dSYM bundles and prints their contents in human-readable form. Only the .debug_info section is printed unless one of the section-specific options or --all is specified.
If no input file is specified, a.out is used instead. If - is used as the input file, llvm-dwarfdump reads the input from its standard input stream. No cap. π«Ά
β¨ OPTIONS β¨
-a,--allβ Dump all supported DWARF sections.--arch=<arch>β Dump DWARF debug information for the specified CPU architecture. Architectures may be specified by name or by number. This option can be specified multiple times, once for each desired architecture. All CPU architectures will be printed by default.-c,--show-childrenβ Show a debug info entry's children when selectively printing with the=<offset>argument of--debug-info, or options such as--findor--name.--colorβ Use colors in output. Aesthetic? Immaculate. π--error-display=<value>β Set the level of detail and summary to display when verifying. Implies--verify. The supported values are:quietβ Only display whether errors occurred.summaryβ Display only a summary of the errors found.detailsβ Display each error in detail but no summary.fullβ Display each error as well as a summary. [default]
-f <name>,--find=<name>β Search for the exact text<name>in the accelerator tables and print the matching debug information entries. When there is no accelerator tables or the name of the DIE you are looking for is not found in the accelerator tables, try using the slower but more complete--nameoption.-F,--show-formβ Show DWARF form types after the DWARF attribute types.-h,--helpβ Show help and usage for this command.--help-listβ Show help and usage for this command without grouping the options into categories.-i,--ignore-caseβ Ignore case distinctions when using--name.-n <name>,--name=<name>β Find and print all debug info entries whose name (DW_AT_name/DW_AT_linkage_nameattribute) is<name>.--lookup=<address>β Look up<address>in the debug information and print out the file, function, block, and line table details.-o <path>β Redirect output to a file specified by<path>, where-is the standard output stream.-p,--show-parentsβ Show a debug info entry's parents when selectively printing with the=<offset>argument of--debug-info, or options such as--findor--name.--parent-recurse-depth=<N>β When displaying debug info entry parents, only show them to a maximum depth of<N>.--quietβ Use with--verifyto not emit to STDOUT.-r <N>,--recurse-depth=<N>β When displaying debug info entries, only show children to a maximum depth of<N>.--show-section-sizesβ Show the sizes of all debug sections, expressed in bytes.--show-sourcesβ Print all source files mentioned in the debug information. Absolute paths are given whenever possible.--statisticsβ Collect debug info quality metrics and print the results as machine-readable single-line JSON output. The output format is described in the section below (FORMAT OF STATISTICS OUTPUT).--summarize-typesβ Abbreviate the description of type unit entries.-t,--filter-child-tagβ Only dump children whose DWARF tag is one of the specified tags. Example usage:
llvm-dwarfdump -t DW_TAG_structure_type -t DW_TAG_member -c
-x,--regexβ Treat any<name>strings as regular expressions when searching with--name. If--ignore-caseis also specified, the regular expression becomes case-insensitive.-u,--uuidβ Show the UUID for each architecture.--diffβ Dump the output in a format that is more friendly for comparing DWARF output from two different files.-v,--verboseβ Display verbose information when dumping. This can help to debug DWARF issues.--verifyβ Verify the structure of the DWARF information by verifying the compile unit chains, DIE relationships graph, address ranges, and more.--verify-json=<path>β Output JSON-formatted error summary to the file specified by<path>. Implies--verify. The output format is described in the section below (FORMAT OF VERIFY JSON OUTPUT).--versionβ Display the version of the tool.
Okay bestie, here's the section-dump squad. These all dump the specified DWARF section by name. Only the .debug_info section is shown by default. Some entries support adding an =<offset> as a way to provide an optional offset of the exact entry to dump within the respective section. When an offset is provided, only the entry at that offset will be dumped, else the entire section will be dumped.
The --debug-macro option prints both the .debug_macro and the .debug_macinfo sections.
The --debug-frame and --eh-frame options are aliases, in cases where both sections are present one command outputs both.
--debug-abbrevβ Dump the specified DWARF section by name.--debug-addrβ Dump the specified DWARF section by name.--debug-arangesβ Dump the specified DWARF section by name.--debug-cu-indexβ Dump the specified DWARF section by name.--debug-frame [=<offset>]β Dump the specified DWARF section by name. Supports optional=<offset>.--debug-gnu-pubnamesβ Dump the specified DWARF section by name.--debug-gnu-pubtypesβ Dump the specified DWARF section by name.--debug-info [=<offset>]β Dump the specified DWARF section by name. Supports optional=<offset>.--debug-line [=<offset>]β Dump the specified DWARF section by name. Supports optional=<offset>.--debug-line-strβ Dump the specified DWARF section by name.--debug-loc [=<offset>]β Dump the specified DWARF section by name. Supports optional=<offset>.--debug-loclists [=<offset>]β Dump the specified DWARF section by name. Supports optional=<offset>.--debug-macroβ Dump the specified DWARF section by name.--debug-namesβ Dump the specified DWARF section by name.--debug-pubnamesβ Dump the specified DWARF section by name.--debug-pubtypesβ Dump the specified DWARF section by name.--debug-rangesβ Dump the specified DWARF section by name.--debug-rnglistsβ Dump the specified DWARF section by name.--debug-strβ Dump the specified DWARF section by name.--debug-str-offsetsβ Dump the specified DWARF section by name.--debug-tu-indexβ Dump the specified DWARF section by name.--debug-types [=<offset>]β Dump the specified DWARF section by name. Supports optional=<offset>.--eh-frame [=<offset>]β Dump the specified DWARF section by name. Supports optional=<offset>.--gdb-indexβ Dump the specified DWARF section by name.--apple-namesβ Dump the specified DWARF section by name.--apple-typesβ Dump the specified DWARF section by name.--apple-namespacesβ Dump the specified DWARF section by name.--apple-objcβ Dump the specified DWARF section by name.--show-variable-coverageβ Show per-variable coverage metrics. The output format is described in the section below (FORMAT OF VARIABLE COVERAGE OUTPUT).--coverage-baselineβ File to use as the baseline for variable coverage statistics (implies--show-variable-coverage).--variable-coverage-bitcode-fileβ File containing LLVM IR (bitcode or textual) used for calculating variable definedness in coverage statistics (implies--show-variable-coverage).--combine-inline-variable-instancesβ Use with--show-variable-coverageto average variable coverage across inlined subroutine instances instead of printing them separately.@<FILE>β Read command-line options from<FILE>.
π FORMAT OF STATISTICS OUTPUT π
The --statistics option generates single-line JSON output representing quality metrics of the processed debug info. These metrics are useful to compare changes between two compilers, particularly for judging the effect that a change to the compiler has on the debug info quality.
The output is formatted as key-value pairs. The first pair contains a version number. The following naming scheme is used for the keys:
variables==> local variables and parameterslocal vars==> local variablesparams==> formal parameters
For aggregated values, the following keys are used:
sum_of_all_variables(...)==> the sum applied to all variables#bytes==> the number of bytes#variables - entry values ...==> the number of variables excluding the entry values etc.
π§Ύ FORMAT OF VERIFY JSON OUTPUT π§Ύ
The format of the JSON output created by the --verify-json is:
{
"error-categories": {
"<first category description>": {"count": 1234},
"<next category description>": {"count": 4321}
},
"error-count": 5555
}
The following is generated if there are no errors reported:
{
"error-categories": {},
"error-count": 0
}
π FORMAT OF VARIABLE COVERAGE OUTPUT π
The --show-variable-coverage option differs from --statistics by printing per-variable debug info coverage metrics based on the number of source lines covered instead of the number of instruction bytes. Compared to counting instruction bytes, this is more stable across compilations and better reflects the debugging experience. The output is a tab-separated table containing the following columns:
Function==> Name of the function the variable was found inInstanceCount(when--combine-inline-variable-instancesis specified) ==> Number of instances of the function; this is 1 for functions that have not been inlined, and n+1 for functions that have been inlined n timesInlChain(when--combine-inline-variable-instancesis not specified) ==> Chain of call sites (file and line number) that the function has been inlined into; this will be empty if the function has not been inlinedVariable==> Name of the variableDecl==> Source location (file and line number) of the variable's declarationLinesCovered==> Number of source lines covered by the variable's debug information in the input fileBaseline(empty if--coverage-baselineis not specified) ==> Number of source lines covered by the variable's debug information in the baselineCoveredRatio(empty if--coverage-baselineis not specified) ==> Ratio of the coverage compared to the baseline (calculated asLinesCovered/Baseline)LinesPresent(empty if--coverage-baselineis not specified) ==> Number of source lines covered in the variable's baseline debug information that are also present in the input file's line tableLinesPresentRatio(empty if--coverage-baselineis not specified) ==> Ratio of the line table coverage compared to the baseline (calculated asLinesPresent/Baseline)
πͺ EXIT STATUS πͺ
llvm-dwarfdump returns 0 if the input files were parsed and dumped successfully. Otherwise, it returns 1.
π SEE ALSO π
π«Ά AUTHOR π«Ά
Maintained by the LLVM Team (https://llvm.org/).
Β©οΈ COPYRIGHT Β©οΈ
2003-2026, LLVM Project
Bye bestie π β this page is LLVM 23, dated 2026-10-06, and that's the LLVM-DWARFDUMP(1) footer tea β
π¦ where this page comes from
- centos-stream 9: llvm 23.1.3-1.el9 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- centos-stream 9: llvm 23.1.3-1.el9 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms