LLVM-DWARFDUMP(1)
π llvm-dwarfdump β the DWARF-dumping bestie you didn't know you needed π
okay so bestie, welcome to llvm-dwarfdump(1) from the LLVM manual set. this is the tool that reads your DWARF debug info and tells you what's actually in there, no cap. let's get into it π«Ά
β¨ NAME β¨
llvm-dwarfdump β dump and verify DWARF debug information. literally its whole personality π
πΈ SYNOPSIS πΈ
llvm-dwarfdump [options] [filename ...]
π¦ DESCRIPTION π¦
So llvm-dwarfdump parses the DWARF sections inside object files, archives, and .dSYM bundles, and prints what's in them in human-readable form. icon behavior honestly.
heads up: it only prints the.debug_infosection by default β that's it, that's the whole default vibe β unless you pass one of the section-specific options or--all.
No input file? It just uses a.out instead, casual. And if you pass - as the input file, llvm-dwarfdump reads the input from its standard input stream. slay, stdin support π
β OPTIONS β
-a,--allβ dump all supported DWARF sections. everything, the whole menu π₯--arch=<arch>β dump DWARF debug info for the specified CPU architecture. you can specify an architecture by name or by number. this option can be given multiple times, once for each architecture you want. by default all CPU architectures get printed. multi-arch main character energy π-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. give the children their moment π--colorβ use colors in output. yes bestie, aesthetic mode π-f <name>,--find=<name>β search for the exact text<name>in the accelerator tables and print the matching debug info entries. if there are no accelerator tables, or the name of the DIE you're hunting isn't in them, try the slower but more complete--nameoption instead. it's giving thorough π§-F,--show-formβ show DWARF form types after the DWARF attribute types. extra detail, we love to see it β¨-h,--helpβ show help and usage for this command. classic π--help-listβ show help and usage for this command without grouping the options into categories. ungrouped, unfiltered, just vibes π-i,--ignore-caseβ ignore case distinctions when using--name. uppercase, lowercase, who cares π-n <name>,--name=<name>β find and print all debug info entries whose name (theDW_AT_nameattribute) is<name>. name search supremacy π¦--lookup=<address>β look up<address>in the debug information and print out the file, function, block, and line table details. address β lore pipeline π-o <path>β redirect output to a file specified by<path>, where-is the standard output stream. yes you can still just yell into stdout π-p,--show-parentsβ show a debug info entry's parents when 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 to a maximum depth of<N>. don't go too deep into the family history π--quietβ use with--verifyto not emit to STDOUT. silence is golden π€«-r <N>,--recurse-depth=<N>β when displaying debug info entries, only show children to a maximum depth of<N>. depth limit, boundaries, we respect them π--show-section-sizesβ show the sizes of all debug sections, expressed in bytes. numbers bestie, bytes bestie π’--show-sourcesβ print all source files mentioned in the debug information. absolute paths are given whenever possible. source file shoutouts π«Ά--statisticsβ collect debug info quality metrics and print the results as machine-readable single-line JSON output. the output format is described down below in FORMAT OF STATISTICS OUTPUT. metrics girlies rise π--summarize-typesβ abbreviate the description of type unit entries. short and sweet β¨-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 on regex on regex π-u,--uuidβ show the UUID for each architecture. every arch gets their id card πͺͺ--diffβ dump the output in a format that's more friendly for comparing DWARF output from two different files. side-by-side comparison era π-v,--verboseβ display verbose information when dumping. this can help to debug DWARF issues. talkative and helpful, the best combo π£οΈ--verifyβ verify the structure of the DWARF information by verifying the compile unit chains, DIE relationships graph, address ranges, and more. full structural integrity check, no cap β--versionβ display the version of the tool. gotta know which one you're running π·οΈ--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 support adding an=<offset>as a way to give an optional offset of the exact entry to dump within that section. when you provide an offset, only the entry at that offset gets dumped; otherwise the entire section gets dumped. π―
the --debug-macro option prints both the .debug_macro and the .debug_macinfo sections. two for one π
the --debug-frame and --eh-frame options are aliases β in cases where both sections are present, one command outputs both. alias behavior, iconic π¦
@<FILE>β read command-line options from<FILE>. options from a file, very efficient of you π
π 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 β particularly for judging the effect that a change to the compiler has on the debug info quality. compiler diffing, we love to see it π¬
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 parameters
- local vars ==> local variables
- params ==> formal parameters
For aggregated values, these 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. simple as that, no plot twist π«Ά
π SEE ALSO π
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). the whole team, collectively iconic π
π COPYRIGHT π
2003-2023, LLVM Project
and that's the whole page bestie!! tysm for reading, mwah π this was LLVM 15, dated 2023-01-14, straight from the LLVM-DWARFDUMP(1) manual β go dump some DWARF and slay the day πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· 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