LLVM-DWARFDUMP(1)
β¨ LLVM-DWARFDUMP β okay bestie, let's talk DWARF π
so this is llvm-dwarfdump, a manual page from the LLVM fam, and it's literally the tool that dumps and verifies your DWARF debug information. buckle up. π¦
πΈ NAME πΈ
llvm-dwarfdump β dump and verify DWARF debug information. that's it. that's the job. iconic behavior honestly. π
π SYNOPSIS π
llvm-dwarfdump [options] [filename ...]
π DESCRIPTION π
okay so llvm-dwarfdump parses DWARF sections inside object files, archives, and .dSYM bundles, and then prints their contents in a human-readable form. cute, right? π«Ά
but here's the thing β by default it only prints the .debug_info section. just that one. unless you go ahead and specify one of the section-specific options, or you hit it with --all. then it's all you, babe. β¨
and if you don't give it an input file at all? it just uses a.out instead. no thoughts, head empty, a.out it is. π
and if you use - as the input file, llvm-dwarfdump reads the input from its standard input stream. very main character of it. π
β¨ OPTIONS β¨
-a,--allβ dump all supported DWARF sections. everything. the whole buffet. π--arch=<arch>β dump DWARF debug information for the specified CPU architecture. you can name the architecture by name or by number. and you can pass this option multiple times, once for each architecture you're obsessed with. 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. so the kids come too. π--colorβ use colors in output. pretty output is valid output. π-f <name>,--find=<name>β search for the exact text<name>in the accelerator tables and print the matching debug information entries. ngl, when there are no accelerator tables, or the name of the DIE you're hunting for isn't in the accelerator tables, try the slower but more complete--nameoption instead. lowkey more work, highkey more thorough. π₯-F,--show-formβ show DWARF form types after the DWARF attribute types. extra detail, we love her. β¨-h,--helpβ show help and usage for this command. π«Ά--help-listβ show help and usage for this command without grouping the options into categories. just a big ol' list, no vibes-based organization. π-i,--ignore-caseβ ignore case distinctions when using--name. capital letters found unemployed. π-n <name>,--name=<name>β find and print all debug info entries whose name (theDW_AT_nameattribute) is<name>. searching by name like it's a group chat. π--lookup=<address>β look up<address>in the debug information and print out the file, function, block, and line table details. full detective mode. π΅οΈ-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 with options like--findor--name. family reunion time. π«Ά--parent-recurse-depth=<N>β when displaying debug info entry parents, only show them to a maximum depth of<N>. we're not going all the way up, bestie. π--quietβ use with--verifyto not emit to STDOUT. shhh. π€«-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. numbers! π--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 the section called FORMAT OF STATISTICS OUTPUT. π--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 girlies rise. π₯-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. side by side, like a duo. π―-v,--verboseβ display verbose information when dumping. this can help to debug DWARF issues. it's giving "tell me everything". π£οΈ--verifyβ verify the structure of the DWARF information by verifying the compile unit chains, DIE relationships graph, address ranges, and more. thorough. π--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, remember? some of these 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 β otherwise, the entire section gets dumped. it's giving "specific or everything, your call". π@<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 for comparing changes between two compilers, especially for judging the effect that a change to the compiler has on the debug info quality. ngl, that's genuinely so useful. π§
the output is formatted as key-value pairs. the first pair contains a version number. and 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. no in-between, no "maybe", just binary bestie behavior. π
π SEE ALSO π
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). π«Ά
Β©οΈ COPYRIGHT Β©οΈ
2003-2024, LLVM Project
okay that's the whole page, bestie, you ate that π β¨
and a lil sign-off for the record books: this was LLVM-DWARFDUMP(1) from the LLVM manual, page 11, dated 2024-07-18. periodt. ππ¦π
π¦ where this page comes from
- fedora 43: llvm11 11.1.0-14.fc41 Β· NCSA
- fedora 43: llvm11 11.1.0-14.fc41 Β· NCSA
- fedora 44: llvm11 11.1.0-14.fc41 Β· NCSA
- fedora 44: llvm11 11.1.0-14.fc41 Β· NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms