LLVM-DWARFDUMP(1)
๐ llvm-dwarfdump โ the LLVM manual page, but make it make sense โจ
okay so bestie, welcome to llvm-dwarfdump, one of the LLVM tools. It's the one that dumps and verifies DWARF debug information, and honestly? It's giving main character energy for anyone who's ever stared at a debug binary going "what is in here ๐ญ". Let me walk you through it, no cap.
๐ธ SYNOPSIS ๐ธ
llvm-dwarfdump [options] [filename ...]
literally just options and then zero or more filenames, that's the whole vibe ๐ซถ
๐ DESCRIPTION ๐
okay so llvm-dwarfdump parses DWARF sections inside object files, archives, and .dSYM bundles, and prints their contents in human-readable form. Iconic behaviour. It takes that raw binary soup and makes it readable, we love to see it.
here's the important bit tho: only the .debug_info section is printed unless you specify one of the section-specific options or --all. So don't come for it when you only get .debug_info bestie, that's the default, that's the assignment ๐
and if you pass no input file at all? it uses a.out instead. classic. If you use - as the input file, llvm-dwarfdump reads the input from its standard input stream. cute ๐
โจ OPTIONS โจ
-a,--allโ dump all supported DWARF sections. the "just give me everything" option, and honestly, sometimes you need that.--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. so yeah, repeat it as much as you want, it's not jealous ๐-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. it's giving "show me the kids too" ๐ง--colorโ use colors in output. yes queen, make those terminal bytes pretty ๐ธ--error-display=<value>โ set the level of detail and summary to display when verifying. This 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]
so full is the default, it's the overachiever of the group and honestly slay ๐
-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. so like,--findis the fast one and--nameis the thorough one. iykyk ๐-F,--show-formโ show DWARF form types after the DWARF attribute types. little extra detail, big energy ๐ฅ-h,--helpโ show help and usage for this command. the classic "help me" button, we've all been there ๐--help-listโ show help and usage for this command without grouping the options into categories. same help, just one big flat list instead of cute organized categories ๐ฆ-i,--ignore-caseโ ignore case distinctions when using--name. soFooandfooare the same girl, periodt ๐-n <name>,--name=<name>โ find and print all debug info entries whose name (DW_AT_name/DW_AT_linkage_nameattribute) is<name>. the thorough search bestie ๐--lookup=<address>โ look up<address>in the debug information and print out the file, function, block, and line table details. address goes in, lore comes out โจ-o <path>โ redirect output to a file specified by<path>, where-is the standard output stream. so you can yeet your output into a file, or back to stdout with-๐ซถ-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. the opposite of--show-children, it's the "who raised you" option ๐ญ--parent-recurse-depth=<N>โ when displaying debug info entry parents, only show them to a maximum depth of<N>. keeps the family tree from getting out of hand ๐ณ--quietโ use with--verifyto not emit to STDOUT. silence. peace. no notes ๐-r <N>,--recurse-depth=<N>โ when displaying debug info entries, only show children to a maximum depth of<N>. same vibe, but for the kids ๐--show-section-sizesโ show the sizes of all debug sections, expressed in bytes. numbers, we love numbers โญ--show-sourcesโ print all source files mentioned in the debug information. Absolute paths are given whenever possible. a little who's-who of your sources ๐--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). yes it's json, yes it's one line, get into it ๐--summarize-typesโ abbreviate the description of type unit entries. short and sweet, we stan a concise queen ๐-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
so you can stack -t like little stickers and filter exactly what you want ๐
-x,--regexโ treat any<name>strings as regular expressions when searching with--name. If--ignore-caseis also specified, the regular expression becomes case-insensitive. regex girlies, this one's for you ๐ฅ-u,--uuidโ show the UUID for each architecture. ID check bestie ๐ชช--diffโ dump the output in a format that is more friendly for comparing DWARF output from two different files. extremely useful when you're like "why did this change??" ๐ญ-v,--verboseโ display verbose information when dumping. This can help to debug DWARF issues. when it gets weird, add-v, that's the move ๐ซถ--verifyโ verify the structure of the DWARF information by verifying the compile unit chains, DIE relationships graph, address ranges, and more. it's the vibe check for your debug info, and it does NOT let things slide ๐--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). machine-readable receipts, iconic ๐--versionโ display the version of the tool. which one are we running, bestie ๐ธ--debug-abbrev,--debug-addr,--debug-aranges,--debug-cu-index,--debug-frame [=<offset>],--debug-gnu-pubnames,--debug-gnu-pubtypes,--debug-info [=<offset>],--debug-line [=<offset>],--debug-line-str,--debug-loc [=<offset>],--debug-loclists [=<offset>],--debug-macro,--debug-names,--debug-pubnames,--debug-pubtypes,--debug-ranges,--debug-rnglists,--debug-str,--debug-str-offsets,--debug-tu-index,--debug-types [=<offset>],--eh-frame [=<offset>],--gdb-index,--apple-names,--apple-types,--apple-namespaces,--apple-objcโ dump the specified DWARF section by name. Only the.debug_infosection 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. two for one, we love a bundle ๐
The --debug-frame and --eh-frame options are aliases, in cases where both sections are present one command outputs both. so don't @ them for being the same, they know ๐ฆ
--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). the "compare it to this" file ๐--variable-coverage-bitcode-fileโ file containing LLVM IR (bitcode or textual) used for calculating variable definedness in coverage statistics (implies--show-variable-coverage). yes, bitcode or textual, both are welcome here ๐--combine-inline-variable-instancesโ use with--show-variable-coverageto average variable coverage across inlined subroutine instances instead of printing them separately. group chat energy: average them out instead of one-by-one ๐ธ@<FILE>โ read command-line options from<FILE>. options in a file, extremely convenient, no notes ๐ซถ
๐ 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. so it's the perfect thing to bring to your "did my compiler change make things better or worse" moment ๐
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
}
empty categories and a big fat zero, the dream scenario honestly ๐โจ
๐ 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. so it's the more chill, more meaningful metric, and i'm obsessed ๐ค
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. that's it, that's the whole story. success is 0, anything else is 1, no in-between drama ๐
๐ฅ SEE ALSO ๐ฅ
dsymutil(1) <dsymutil.html> โ go check that one out too bestie, it's in the same friend group ๐
๐ Author ๐
Maintained by the LLVM Team (https://llvm.org/). they keep the whole thing running and we appreciate them fr fr ๐ซถ
๐ธ Copyright ๐ธ
2003-2026, LLVM Project
ok that's the whole page bestie, go dump some DWARF and slay ๐ โจ
and one last cute sign-off: this iconic piece of documentation was brought to you by LLVM-DWARFDUMP(1) from the LLVM manual collection, dated 2026-10-20, page 23 of the manual. mwah, go verify some debug info ๐๐
๐ฆ where this page comes from
- arch rolling: llvm 23.1.4-1 ยท Apache-2.0 WITH LLVM-exception
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms