DWARFDUMP(1) LLVM DWARFDUMP(1)

dwarfdump - dump and verify DWARF debug information

dwarfdump [options] [filename ...]

dwarfdump parses DWARF sections in object files, archives, and .dSYM bundles and prints their contents in human-readable form. Only the .debug_info section is printed unless one of the section-specific options or --all is specified.

If no input file is specified, a.out is used instead. If - is used as the input file, dwarfdump reads the input from its standard input stream.

Dump all supported DWARF sections.

Dump DWARF debug information for the specified CPU architecture. Architectures may be specified by name or by number. This option can be specified multiple times, once for each desired architecture. All CPU architectures will be printed by default.

Show a debug info entry's children when selectively printing with the =<offset> argument of --debug-info, or options such as --find or --name.

Use colors in output.

Search for the exact text <name> in the accelerator tables and print the matching debug information entries. When there is no accelerator tables or the name of the DIE you are looking for is not found in the accelerator tables, try using the slower but more complete --name option.

Show DWARF form types after the DWARF attribute types.

Show help and usage for this command.

Show help and usage for this command without grouping the options into categories.

Ignore case distinctions when using --name.

Find and print all debug info entries whose name (DW_AT_name attribute) is <name>.

Look up <address> in the debug information and print out the file, function, block, and line table details.

Redirect output to a file specified by <path>, where - is the standard output stream.

Show a debug info entry's parents when selectively printing with the =<offset> argument of --debug-info, or options such as --find or --name.

When displaying debug info entry parents, only show them to a maximum depth of <N>.

Use with --verify to not emit to STDOUT.

When displaying debug info entries, only show children to a maximum depth of <N>.

Show the sizes of all debug sections, expressed in bytes.

Print all source files mentioned in the debug information. Absolute paths are given whenever possible.

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).

Abbreviate the description of type unit entries.

Treat any <name> strings as regular expressions when searching with --name. If --ignore-case is also specified, the regular expression becomes case-insensitive.

Show the UUID for each architecture.

Dump the output in a format that is more friendly for comparing DWARF output from two different files.

Display verbose information when dumping. This can help to debug DWARF issues.

Verify the structure of the DWARF information by verifying the compile unit chains, DIE relationships graph, address ranges, and more.

Display the version of the tool.

Dump the specified DWARF section by name. Only the .debug_info section is shown by default. Some 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, else the entire section will be dumped.

The --debug-macro option prints both the .debug_macro and the .debug_macinfo sections.

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


@<FILE>
Read command-line options from <FILE>.

The --statistics option generates single-line JSON output representing quality metrics of the processed debug info. These metrics are useful to compare changes between two compilers, particularly for judging the effect that a change to the compiler has on the debug info quality.

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.



dwarfdump returns 0 if the input files were parsed and dumped successfully. Otherwise, it returns 1.

dsymutil(1)

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

2003-2024, LLVM Project

2024-01-25 11