sourCEntral - mobile manpages

pdf

DWARFDUMP

NAME

dwarfdump − dumps DWARF debug information of an ELF object

SYNOPSIS

dwarfdump [-abcdefilmoprsvy] [-ka] [-t{afv}] [-uobjectfile] filename

DESCRIPTION

The dwarfdump command prints DWARF sections as requested by specific options. With no options nothing prints!

The format is intended to be human readable. If a script is to parse the output, the −d option is useful.

Not all sections actually exist in any given object file.

The format may change from release to release, so it is unwise to depend too heavily on the format.

Frame information (.debug_frame and .eh_frame) is heavily dependent on the ABI/ISA of the object file. The ’-R’ option uses a built-in ’generic’ register name set handling up to 1000 registers named r0-r999. The ’-x abi=<abi>’ flavors below describe how to name an abi and use that to guide the -f or -F processing. Without ’-R’ or ’-x abi=<abi>’/ dwarfdump ignores the dwarfdump.conf file and uses compiled-in MIPS/IRIX conventions). If no ’-x name=<path>’ is given, dwarfdump looks for "./dwarfdump.conf", "$HOME/.dwarfdump.conf", "<install-prefix>/lib/dwarfdump.conf" and takes the first it finds. If one or more ’-x name=<path>’ is given the last of these is used and all other such files ignored.

The dwarfdump command accepts one or more of the following options:

−a

Dumps all sections. Same as −bcfilmoprsy −tfv.

−b

Dumps the .debug_abbrev section.

−c

Dumps the .debug_loc section.

−d

Dense mode. Each die information of the .debug_info section is printed in one-line format. This option does not imply −i.

−e

Ellipsis mode. Short names for DW_TAG_* and DW_ATTR_* are used in the output for the .debug_info section.

−f

Dumps the .debug_frame section.

−i

Dumps the .debug_info section.

−ka

Adds all available error checks to whatever sections are being read. At the end of the run prints the instances inspected and the number of errors for each type of check. If there are more than zero errors the compiler has emitted invalid DWARF.

−l

Dumps the .debug_line information.

−m

Dumps the .debug_macinfo section.

−o

Dumps the .reloc_debug_* sections.

−p

Dumps the .debug_pubnames section.

−r

Dumps the .debug_aranges section.

−s

Dumps .debug_string section.

−ta

Same as −tfv.

−tf

Dumps the .debug_static_funcs section.

−tv

Dumps the .debug_static_vars section.

−uofile

Restricts the dumping of sections to the named compilation unit.

−v

Verbose mode. Shows more detailed information. More detailed information about the .debug_frame section prints if 2 or 3 −v options are given.

−w

Dumps the .debug_weaknames section.

−x abi=<conf>

where abi=names an abi in dwarfdump.conf (see the abiname: command in dwarfdump.conf).

−x name=<conf>

where name=names the full pathname of a dwarfdump configuration file. Default install location is /usr/local/lib/dwarfdump.conf. dwarfdump looks first for local ./dwarfdump.conf, then for $HOME/.dwarfdump.conf then for /usr/local/lib/dwarfdump.conf. The predefined abi names in dwarfdump.conf are generic, ia64, m68k, x86, and x86_64.

−y

Dumps the .debug_types section.

FILES

dwarfdump $(HOME)/.dwarfdump.conf <install-prefix>/lib/dwarfdump.conf

NOTES

In some cases compilers use DW_FORM_data1 (for example) and in such cases the signedness of the value must be taken from context. Rather than attempt to determine the context, dwarfdump prints the value with both signednesses whenever there is ambiguity about the correct interpretation. For example, "DW_AT_const_value 176(as signed = -80)". For normal DWARF consumers that correctly and fully evaluate all attributes there is no ambiguity of signedness: the ambiguity for dwarfdump is due to dwarfdump evaluating DIEs in a simple order and not keeping track of much context.

BUGS

Support for DWARF3 is being completed but may not be complete.

pdf