blob: a3b62664cbe54b904fcbc5607df0ba1396e88452 [file] [log] [blame]
Adrian Prantlf01b3f32017-10-03 23:46:57 +00001llvm-dwarfdump - dump and verify DWARF debug information
2========================================================
Alexey Samsonova47b11a2014-05-19 22:53:29 +00003
4SYNOPSIS
5--------
6
Adrian Prantlf01b3f32017-10-03 23:46:57 +00007:program:`llvm-dwarfdump` [*options*] [*filename ...*]
Alexey Samsonova47b11a2014-05-19 22:53:29 +00008
9DESCRIPTION
10-----------
11
Adrian Prantlf01b3f32017-10-03 23:46:57 +000012:program:`llvm-dwarfdump` parses DWARF sections in object files,
13archives, and `.dSYM` bundles and prints their contents in
14human-readable form. Only the .debug_info section is printed unless one of
15the section-specific options or :option:`--all` is specified.
Alexey Samsonova47b11a2014-05-19 22:53:29 +000016
17OPTIONS
18-------
19
Adrian Prantlf01b3f32017-10-03 23:46:57 +000020.. option:: -a, --all
Alexey Samsonova47b11a2014-05-19 22:53:29 +000021
Adrian Prantlf01b3f32017-10-03 23:46:57 +000022 Disassemble all supported DWARF sections.
23
24.. option:: --arch=<arch>
25
26 Dump DWARF debug information for the specified CPU architecture.
27 Architectures may be specified by name or by number. This
28 option can be specified multiple times, once for each desired
29 architecture. All CPU architectures will be printed by
30 default.
31
32.. option:: -c, --show-children
33
34 Show a debug info entry's children when using
35 the :option:`--debug-info`, :option:`--find`,
36 and :option:`--name` options.
37
38.. option:: -f <name>, --find=<name>
39
40 Search for the exact text <name> in the accelerator tables
41 and print the matching debug information entries.
42 When there is no accelerator tables or the name of the DIE
43 you are looking for is not found in the accelerator tables,
44 try using the slower but more complete :option:`--name` option.
45
46.. option:: -F, --show-form
47
48 Show DWARF form types after the DWARF attribute types.
49
50.. option:: -h, --help
51
52 Show help and usage for this command.
53
54.. option:: -i, --ignore-case
55
56 Ignore case distinctions in when searching entries by name
57 or by regular expression.
58
59.. option:: -n <pattern>, --name=<pattern>
60
61 Find and print all debug info entries whose name
62 (`DW_AT_name` attribute) matches the exact text in
63 <pattern>. Use the :option:`--regex` option to have
64 <pattern> become a regular expression for more flexible
65 pattern matching.
66
67.. option:: --lookup=<address>
68
69 Lookup <address> in the debug information and print out the file,
70 function, block, and line table details.
71
72.. option:: -o <path>, --out-file=<path>
73
74 Redirect output to a file specified by <path>.
75
76.. option:: -p, --show-parents
77
78 Show a debug info entry's parent objects when using the
79 :option:`--debug-info`, :option:`--find`, and
80 :option:`--name` options.
81
82.. option:: -r <n>, --recurse-depth=<n>
83
84 Only recurse to a maximum depth of <n> when dumping debug info
85 entries.
86
Adrian Prantl59f30b82017-10-06 20:24:34 +000087.. option:: --statistics
88
89 Collect debug info quality metrics and print the results
90 as machine-readable single-line JSON output.
91
Adrian Prantlf01b3f32017-10-03 23:46:57 +000092.. option:: -x, --regex
93
94 Treat any <pattern> strings as regular expressions when searching
95 instead of just as an exact string match.
96
97.. option:: -u, --uuid
98
99 Show the UUID for each architecture.
100
101.. option:: --diff
102
103 Dump the output in a format that is more friendly for comparing
104 DWARF output from two different files.
105
106.. option:: -v, --verbose
107
108 Display verbose information when dumping. This can help to debug
109 DWARF issues.
110
111.. option:: --verify
112
113 Verify the structure of the DWARF information by verifying the
114 compile unit chains, DIE relationships graph, address
115 ranges, and more.
116
117.. option:: --version
118
119 Display the version of the tool.
120
121.. option:: --debug-abbrev, --debug-aranges, --debug-cu-index, --debug-frame [=<offset>], --debug-gnu-pubnames, --debug-gnu-pubtypes, --debug-info [=<offset>], --debug-line [=<offset>], --debug-loc [=<offset>], --debug-macro, --debug-pubnames, --debug-pubtypes, --debug-ranges, --debug-str, --debug-str-offsets, --debug-tu-index, --debug-types, --eh-frame, --gdb-index, --apple-names, --apple-types, --apple-namespaces, --apple-objc
122
123 Dump the specified DWARF section by name. Only the
124 `.debug_info` section is shown by default. Some entries
125 support adding an `=<offset>` as a way to provide an
126 optional offset of the exact entry to dump within the
127 respective section. When an offset is provided, only the
128 entry at that offset will be dumped, else the entire
129 section will be dumped. Children of items at a specific
130 offset can be dumped by also using the
131 :option:`--show-children` option where applicable.
Alexey Samsonova47b11a2014-05-19 22:53:29 +0000132
133EXIT STATUS
134-----------
135
Alexey Samsonov85c7d662015-06-25 23:40:15 +0000136:program:`llvm-dwarfdump` returns 0 if the input files were parsed and dumped
137successfully. Otherwise, it returns 1.
Adrian Prantlf01b3f32017-10-03 23:46:57 +0000138
139SEE ALSO
140--------
141
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +0000142:manpage:`dsymutil(1)`