LLVM-DWARFDUMP(1)

✨ llvm-dwarfdump ✨

okay so bestie, welcome to llvm-dwarfdump β€” a manual page from the LLVM collection of manual pages, and she is the girl for dumping and verifying DWARF debug information πŸ’…


🌸 NAME 🌸

llvm-dwarfdump β€” dump and verify DWARF debug information


πŸ¦‹ SYNOPSIS πŸ¦‹

llvm-dwarfdump [options] [filename ...]

πŸ’– DESCRIPTION πŸ’–

llvm-dwarfdump parses DWARF sections inside object files, archives, and .dSYM bundles, then prints what it found in a form that's actually readable by humans 🫢

By default she only prints the .debug_info section. Like, only that one. If you want the other sections you gotta ask β€” either with one of the section-specific options or with --all.

If you don't give her any input file, she just uses a.out instead. And if you use - as the input file, llvm-dwarfdump reads the input from its standard input stream. iconic behaviour, no cap ✨


πŸ‘‘ OPTIONS πŸ‘‘

  • -a, --all β€” dump every DWARF section she supports. all of them. the whole buffet πŸ“
  • --arch=<arch> β€” dump DWARF debug information for the specified CPU architecture. You can name the architecture or just give her the number, whatever's easier. This option can be given multiple times, once for each architecture you want. By default all CPU architectures get printed. every single one πŸ’€
  • -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.
  • --color β€” use colors in the output 🌈 yes she's serving aesthetics.
  • --error-display=<value> β€” sets how much detail and how much summary she shows when verifying. This one implies --verify. The supported values are:
    • quiet β€” only display whether errors occurred.
    • summary β€” display only a summary of the errors found.
    • details β€” display each error in detail but no summary.
    • full β€” display each error as well as a summary. [default]
  • -f <name>, --find=<name> β€” search for the exact text <name> in the accelerator tables and print the matching debug information entries. If 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 the fallback is the real one πŸ™ˆ
  • -F, --show-form β€” show DWARF form types after the DWARF attribute types.
  • -h, --help β€” show help and usage for this command.
  • --help-list β€” show help and usage for this command without grouping the options into categories.
  • -i, --ignore-case β€” ignore case distinctions when you're using --name.
  • -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 receipt 🧾
  • -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 reunion fr fr 🫢
  • --parent-recurse-depth=<N> β€” when displaying debug info entry parents, only show them down to a maximum depth of <N>.
  • --quiet β€” use with --verify to not emit to STDOUT. she's silent, she's mysterious πŸ’œ
  • -r <N>, --recurse-depth=<N> β€” when displaying debug info entries, only show children down to a maximum depth of <N>.
  • --show-section-sizes β€” show the sizes of all debug sections, expressed in bytes.
  • --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 below in the section FORMAT OF STATISTICS OUTPUT.
  • --summarize-types β€” abbreviate the description of type unit entries.
  • -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. multitasking queen ✨
  • -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.
  • -v, --verbose β€” display verbose information when dumping. This can help to debug DWARF issues. she's yapping but it's useful yapping.
  • --verify β€” verify the structure of the DWARF information by verifying the compile unit chains, DIE relationships graph, address ranges, and more. vibe check on your debug info πŸ’€
  • --verify-json=<path> β€” output a JSON-formatted error summary to a file specified by <path>. Implies --verify. The output format is described below in the section FORMAT OF VERIFY JSON OUTPUT.
  • --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> as a way to provide an optional offset of the exact entry to dump within the respective section. When you give 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, slay πŸŽ€

The --debug-frame and --eh-frame options are aliases, and in cases where both sections are present, one command outputs both.

  • @<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. it's giving data πŸ’…

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.

🧚 FORMAT OF VERIFY JSON OUTPUT 🧚

The format of the JSON output created by --verify-json is:

{
  "error-categories": {
    "<first category description>": {"count": 1234},
    "<next category description>": {"count": 4321}
  },
  "error-count": 5555
}

And if there are no errors reported, this is what you get instead:

{
  "error-categories": {},
  "error-count": 0
}

🚦 EXIT STATUS 🚦

llvm-dwarfdump returns 0 if the input files were parsed and dumped successfully. Otherwise, it returns 1. no in-between, she's decisive ⭐


πŸ”₯ SEE ALSO πŸ”₯

dsymutil(1)


πŸ’œ AUTHOR πŸ’œ

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


2003-2025, LLVM Project


okay bestie that's the whole page 🫢 she's from LLVM, this is version 20, dated 2025-09-03, and honestly? she ate. go dump some DWARF πŸ’…βœ¨

πŸ“¦ where this page comes from