LLVM-DWARFDUMP(1)

πŸ“¦
version 11.1.0 Β· 3 versions
, in fedora 43, fedora 44

✨ 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 --find or --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 --name option 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 (the DW_AT_name attribute) 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 --find or --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 --verify to 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-case is 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_info section 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 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. no in-between, no "maybe", just binary bestie behavior. πŸ’€


πŸ‘€ SEE ALSO πŸ‘€

dsymutil(1)


πŸ’œ AUTHOR πŸ’œ

Maintained by the LLVM Team (https://llvm.org/). 🫢


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