LLVM-DWARFDUMP(1)
π llvm-dwarfdump β the LLVM manual page, bestie edition π
okay so real talk: this is llvm-dwarfdump, straight out of the LLVM manual (that's the manual name, bestie, we're not copying the header line, we're better than that πββοΈ). It's the tool that dumps and verifies DWARF debug info, and honestly? iconic behavior.
β¨ SYNOPSIS β¨
llvm-dwarfdump [options] [filename ...]
πΈ DESCRIPTION πΈ
So llvm-dwarfdump parses the DWARF sections inside object files, archives, and .dSYM bundles, and prints what it finds in human-readable form. Very demure. Very mindful. π§
Heads up though: by default it only prints the .debug_info section β you only get the other sections if you pass one of the section-specific options or --all. no cap.
And if you don't give it an input file? It just uses a.out instead. And if you use - as the input file, llvm-dwarfdump reads from its standard input stream. love that for us π«Ά
π₯ OPTIONS π₯
-a,--allβ dump all the supported DWARF sections. the whole buffet, not just the appetizer.--arch=<arch>β dump DWARF debug info for the CPU architecture you specify. You can give architectures by name or by number. And yes, you can pass this option multiple times, once for each architecture you want π . By default, all CPU architectures get printed.-c,--show-childrenβ show a debug info entry's children when you're selectively printing with the=<offset>argument of--debug-info, or with options like--findor--name. bring the whole friend group π«Ά--colorβ use colors in output. aesthetic slay.-f <name>,--find=<name>β search for the exact text name in the accelerator tables and print the matching debug info entries. Ngl, if there are no accelerator tables, or the name of the DIE you're hunting for isn't in them, try the slower but more complete--nameoption instead. (she's thorough but she takes her time, iykyk)-F,--show-formβ show DWARF form types after the DWARF attribute types. the details, the lore β¨-h,--helpβ show help and usage for this command.--help-listβ show help and usage for this command without grouping the options into categories. ungrouped, unfiltered, raw.-i,--ignore-caseβ ignore case distinctions when you're using--name. case? never heard of her.-n <name>,--name=<name>β find and print all debug info entries whose name (theDW_AT_nameattribute) is name.--lookup=<address>β look up address in the debug information and print out the file, function, block, and line table details. the full dossier π-o <path>β redirect output to a file specified by path, where-means the standard output stream.-p,--show-parentsβ show a debug info entry's parents when you're selectively printing with the=<offset>argument of--debug-info, or with options like--findor--name. family tree reveal π³--parent-recurse-depth=<N>β when displaying debug info entry parents, only show them up to a maximum depth of N. we stan boundaries.--quietβ use with--verifyto not emit to STDOUT. shhh π€«-r <N>,--recurse-depth=<N>β when displaying debug info entries, only show children up to a maximum depth of N. go deeper and you're on your own, bestie.--show-section-sizesβ show the sizes of all debug sections, expressed in bytes. numbers!! π--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). data girlies rise π--summarize-typesβ abbreviate the description of type unit entries. short king energy.-x,--regexβ treat any name strings as regular expressions when searching with--name. And if--ignore-caseis also specified, the regular expression becomes case-insensitive. regex + no case = chaos in the best way π₯-u,--uuidβ show the UUID for each architecture.--diffβ dump the output in a format that's more friendly for comparing DWARF output from two different files. side-by-side era π-v,--verboseβ display verbose information when dumping. This can help to debug DWARF issues. she's saying everythinggg.--verifyβ verify the structure of the DWARF information by verifying the compile unit chains, DIE relationships graph, address ranges, and more. trust but verify, periodt β--versionβ display the version of the tool.--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 of these entries support adding an=<offset>so you can give an optional offset of the exact entry to dump within the respective section. When you provide an offset, only the entry at that offset gets dumped β otherwise the entire section gets dumped. the whole squad π
Also, important: the --debug-macro option prints both the .debug_macro and the .debug_macinfo sections. double feature πΏ
And the --debug-frame and --eh-frame options are aliases, so in cases where both sections are present, one command outputs both. they're the same person, your honor π
@<FILE>β read command-line options from FILE. yes, a file full of options. she contains multitudes.
π FORMAT OF STATISTICS OUTPUT π
The --statistics option generates single-line JSON output representing quality metrics of the processed debug info. These metrics are useful for comparing changes between two compilers β especially for judging the effect that a change to the compiler has on the debug info quality. like a vibe check but for compilers β¨
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.
πͺ 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 drama.
π SEE ALSO π
dsymutil(1) β go say hi to her too π
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). iconic, no notes.
Β©οΈ COPYRIGHT Β©οΈ
2003-2025, LLVM Project
okay that's the whole page, bestie!! π¦ this was page 19, dated 2025-01-17, from the LLVM-DWARFDUMP(1) manual β mwah, go dump some DWARF π
π¦ where this page comes from
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms