blob: acb85f55d677bc08ada40a8a3cfd352ffc5fcde0 [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
James Henderson94879632019-06-11 13:51:18 +000056 Ignore case distinctions when searching.
Adrian Prantlf01b3f32017-10-03 23:46:57 +000057
58.. option:: -n <pattern>, --name=<pattern>
59
60 Find and print all debug info entries whose name
61 (`DW_AT_name` attribute) matches the exact text in
62 <pattern>. Use the :option:`--regex` option to have
63 <pattern> become a regular expression for more flexible
64 pattern matching.
65
66.. option:: --lookup=<address>
67
68 Lookup <address> in the debug information and print out the file,
69 function, block, and line table details.
70
James Hendersond5f38da2019-06-11 10:20:07 +000071.. option:: -o <path>
Adrian Prantlf01b3f32017-10-03 23:46:57 +000072
73 Redirect output to a file specified by <path>.
74
75.. option:: -p, --show-parents
76
77 Show a debug info entry's parent objects when using the
78 :option:`--debug-info`, :option:`--find`, and
79 :option:`--name` options.
80
81.. option:: -r <n>, --recurse-depth=<n>
82
83 Only recurse to a maximum depth of <n> when dumping debug info
84 entries.
85
Adrian Prantl59f30b82017-10-06 20:24:34 +000086.. option:: --statistics
87
88 Collect debug info quality metrics and print the results
89 as machine-readable single-line JSON output.
90
Adrian Prantlf01b3f32017-10-03 23:46:57 +000091.. option:: -x, --regex
92
93 Treat any <pattern> strings as regular expressions when searching
94 instead of just as an exact string match.
95
96.. option:: -u, --uuid
97
98 Show the UUID for each architecture.
99
100.. option:: --diff
101
102 Dump the output in a format that is more friendly for comparing
103 DWARF output from two different files.
104
105.. option:: -v, --verbose
106
107 Display verbose information when dumping. This can help to debug
108 DWARF issues.
109
110.. option:: --verify
111
112 Verify the structure of the DWARF information by verifying the
113 compile unit chains, DIE relationships graph, address
114 ranges, and more.
115
116.. option:: --version
117
118 Display the version of the tool.
119
120.. 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
121
122 Dump the specified DWARF section by name. Only the
123 `.debug_info` section is shown by default. Some entries
124 support adding an `=<offset>` as a way to provide an
125 optional offset of the exact entry to dump within the
126 respective section. When an offset is provided, only the
127 entry at that offset will be dumped, else the entire
128 section will be dumped. Children of items at a specific
129 offset can be dumped by also using the
130 :option:`--show-children` option where applicable.
Alexey Samsonova47b11a2014-05-19 22:53:29 +0000131
132EXIT STATUS
133-----------
134
Alexey Samsonov85c7d662015-06-25 23:40:15 +0000135:program:`llvm-dwarfdump` returns 0 if the input files were parsed and dumped
136successfully. Otherwise, it returns 1.
Adrian Prantlf01b3f32017-10-03 23:46:57 +0000137
138SEE ALSO
139--------
140
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +0000141:manpage:`dsymutil(1)`