1 llvm-dwarfutil - A tool to copy and manipulate debug info
2 =========================================================
4 .. program:: llvm-dwarfutil
9 :program:`llvm-dwarfutil` [*options*] *input* *output*
14 :program:`llvm-dwarfutil` is a tool to copy and manipulate debug info.
16 In basic usage, it makes a semantic copy of the input to the output. If any
17 options are specified, the output may be modified along the way, e.g.
18 by removing unused debug info.
20 If "-" is specified for the input file, the input is read from the program's
21 standard input stream. If "-" is specified for the output file, the output
22 is written to the standard output stream of the program.
24 The tool is still in active development.
29 .. option:: --garbage-collection
31 Removes pieces of debug information related to discarded sections.
32 When the linker does section garbage collection the abandoned debug info
33 is left behind. Such abandoned debug info references address ranges using
34 tombstone values. Thus, when this option is specified, the tool removes
35 debug info which is marked with the tombstone value.
37 That option is enabled by default.
39 .. option:: --odr-deduplication
41 Remove duplicated types (if "One Definition Rule" is supported by source
42 language). Keeps first type definition and removes other definitions,
43 potentially significantly reducing the size of output debug info.
45 That option is enabled by default.
47 .. option:: --help, -h
49 Print a summary of command line options.
51 .. option:: --no-garbage-collection
53 Disable :option:`--garbage-collection`.
55 .. option:: --no-odr-deduplication
57 Disable :option:`--odr-deduplication`.
59 .. option:: --no-separate-debug-file
61 Disable :option:`--separate-debug-file`.
63 .. option:: --num-threads=<n>, -j
65 Specifies the maximum number (`n`) of simultaneous threads to use
68 .. option:: --separate-debug-file
70 Generate separate file containing output debug info. Using
71 :program:`llvm-dwarfutil` with that option equals to the
72 following set of commands:
74 .. code-block:: console
76 :program:`llvm-objcopy` --only-keep-debug in-file out-file.debug
77 :program:`llvm-objcopy` --strip-debug in-file out-file
78 :program:`llvm-objcopy` --add-gnu-debuglink=out-file.debug out-file
80 .. option:: --tombstone=<value>
82 <value> can be one of the following values:
84 - `bfd`: zero for all addresses and [1,1] for DWARF v4 (or less) address ranges and exec.
86 - `maxpc`: -1 for all addresses and -2 for DWARF v4 (or less) address ranges.
88 - `universal`: both `bfd` and `maxpc`.
90 - `exec`: match with address ranges of executable sections.
92 The value `universal` is used by default.
96 Enable verbose logging. This option disables multi-thread mode.
100 Run the DWARF verifier on the output DWARF debug info.
102 .. option:: --version
104 Print the version of this program.
109 The following formats are currently supported by :program:`llvm-dwarfutil`:
116 :program:`llvm-dwarfutil` exits with a non-zero exit code if there is an error.
117 Otherwise, it exits with code 0.
122 To report bugs, please visit <https://github.com/llvm/llvm-project/labels/tools:llvm-dwarfutil/>.