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 --find or --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 --name option 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 (the DW_AT_name attribute) 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 --find or --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 --verify to 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-case is 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_info section 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 parameters
  • local vars ==> local variables
  • params ==> 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.

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