LLVM-DWARFDUMP(1)

πŸ“¦ version 15.0.7, in opensuse-leap 16.0

πŸ’– 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_info section 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 --find or --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 --name option 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 (the DW_AT_name attribute) 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 --find or --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 --verify to 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-case is 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_info section 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 πŸ‘€

dsymutil(1)


🌟 AUTHOR 🌟

Maintained by the LLVM Team (https://llvm.org/). the whole team, collectively iconic πŸ‘‘


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