blob: 5b7016ced2f564c85fd0c4a9da6421d4ec243912 [file] [log] [blame]
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +00001dsymutil - manipulate archived DWARF debug symbol files
2=======================================================
3
James Hendersona0566842019-06-27 13:24:46 +00004.. program:: dsymutil
5
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +00006SYNOPSIS
7--------
8
9| :program:`dsymutil` [*options*] *executable*
10
11DESCRIPTION
12-----------
13
14:program:`dsymutil` links the DWARF debug information found in the object files
15for an executable *executable* by using debug symbols information contained in
16its symbol table. By default, the linked debug information is placed in a
17``.dSYM`` bundle with the same name as the executable.
18
19OPTIONS
20-------
Xing GUO12224162020-04-23 20:06:21 +080021.. option:: --accelerator=<accelerator type>
22
23 Specify the desired type of accelerator table. Valid options are 'Apple',
24 'Dwarf' and 'Default'.
25
Jonas Devlieghereb7924d62020-05-18 11:34:09 -070026.. option:: --arch <arch>
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000027
28 Link DWARF debug information only for specified CPU architecture types.
29 Architectures may be specified by name. When using this option, an error will
30 be returned if any architectures can not be properly linked. This option can
31 be specified multiple times, once for each desired architecture. All CPU
32 architectures will be linked by default and any architectures that can't be
33 properly linked will cause :program:`dsymutil` to return an error.
34
Adrian Prantl3c6491d2017-11-06 16:52:05 +000035.. option:: --dump-debug-map
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000036
Adrian Prantl3c6491d2017-11-06 16:52:05 +000037 Dump the *executable*'s debug-map (the list of the object files containing the
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000038 debug information) in YAML format and exit. Not DWARF link will take place.
39
Jonas Devlieghereb7924d62020-05-18 11:34:09 -070040.. option:: --flat, -f
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000041
42 Produce a flat dSYM file. A ``.dwarf`` extension will be appended to the
Xing GUO12224162020-04-23 20:06:21 +080043 executable name unless the output file is specified using the ``-o`` option.
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000044
Jonas Devlieghereb7924d62020-05-18 11:34:09 -070045.. option:: --help, -h
Jonas Devliegherecca341b2018-01-30 19:54:16 +000046
Xing GUO12224162020-04-23 20:06:21 +080047 Print this help output.
48
Jonas Devlieghereb7924d62020-05-18 11:34:09 -070049.. option:: --minimize, -z
Xing GUO12224162020-04-23 20:06:21 +080050
Jonas Devlieghereb7924d62020-05-18 11:34:09 -070051 When used when creating a dSYM file, this option will suppress the emission of
52 the .debug_inlines, .debug_pubnames, and .debug_pubtypes sections since
53 dsymutil currently has better equivalents: .apple_names and .apple_types. When
54 used in conjunction with ``--update`` option, this option will cause redundant
55 accelerator tables to be removed.
Jonas Devliegherecca341b2018-01-30 19:54:16 +000056
Adrian Prantl3c6491d2017-11-06 16:52:05 +000057.. option:: --no-odr
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000058
59 Do not use ODR (One Definition Rule) for uniquing C++ types.
60
Adrian Prantl3c6491d2017-11-06 16:52:05 +000061.. option:: --no-output
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000062
63 Do the link in memory, but do not emit the result file.
64
Adrian Prantl3c6491d2017-11-06 16:52:05 +000065.. option:: --no-swiftmodule-timestamp
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000066
67 Don't check the timestamp for swiftmodule files.
68
Jonas Devlieghereb7924d62020-05-18 11:34:09 -070069.. option:: --num-threads <threads>, -j <threads>
70
71 Specifies the maximum number (``n``) of simultaneous threads to use when
72 linking multiple architectures.
73
74.. option:: --object-prefix-map <prefix=remapped>
Adrian Prantled8ad6e2020-03-18 15:31:39 -070075
76 Remap object file paths (but no source paths) before processing. Use
77 this for Clang objects where the module cache location was remapped using
78 ``-fdebug-prefix-map``; to help dsymutil find the Clang module cache.
Xing GUO12224162020-04-23 20:06:21 +080079
Jonas Devlieghereb7924d62020-05-18 11:34:09 -070080.. option:: --oso-prepend-path <path>
Xing GUO12224162020-04-23 20:06:21 +080081
82 Specifies a ``path`` to prepend to all debug symbol object file paths.
83
Jonas Devlieghereb7924d62020-05-18 11:34:09 -070084.. option:: --out <filename>, -o <filename>
Xing GUO12224162020-04-23 20:06:21 +080085
86 Specifies an alternate ``path`` to place the dSYM bundle. The default dSYM
87 bundle path is created by appending ``.dSYM`` to the executable name.
Jonas Devlieghere7fb9bcd2020-05-06 19:38:30 -070088
Jonas Devlieghere9e3e7a92018-04-02 10:40:43 +000089.. option:: --papertrail
90
91 When running dsymutil as part of your build system, it can be desirable for
92 warnings to be part of the end product, rather than just being emitted to the
93 output stream. When enabled warnings are embedded in the linked DWARF debug
94 information.
95
Xing GUO12224162020-04-23 20:06:21 +080096.. option:: --remarks-output-format <format>
97
98 Specify the format to be used when serializing the linked remarks.
99
100.. option:: --remarks-prepend-path <path>
101
102 Specify a directory to prepend the paths of the external remark files.
103
Jonas Devlieghere7fb9bcd2020-05-06 19:38:30 -0700104.. option:: --statistics
105
106 Print statistics about the contribution of each object file to the linked
107 debug info. This prints a table after linking with the object file name, the
108 size of the debug info in the object file (in bytes) and the size contributed
109 (in bytes) to the linked dSYM. The table is sorted by the output size listing
110 the obj ect files with the largest contribution first.
111
Xing GUO12224162020-04-23 20:06:21 +0800112.. option:: --symbol-map <bcsymbolmap>
113
114 Update the existing dSYMs inplace using symbol map specified.
115
Adrian Prantl3c6491d2017-11-06 16:52:05 +0000116.. option:: -s, --symtab
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +0000117
Adrian Prantl3c6491d2017-11-06 16:52:05 +0000118 Dumps the symbol table found in *executable* or object file(s) and exits.
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +0000119
Xing GUO12224162020-04-23 20:06:21 +0800120.. option:: -S
121
122 Output textual assembly instead of a binary dSYM companion file.
123
124.. option:: --toolchain <toolchain>
Jonas Devlieghere2902a212018-03-08 10:39:12 +0000125
126 Embed the toolchain in the dSYM bundle's property list.
127
Jonas Devlieghered4034d22018-02-08 10:48:54 +0000128.. option:: -u, --update
129
130 Update an existing dSYM file to contain the latest accelerator tables and
131 other DWARF optimizations. This option will rebuild the '.apple_names' and
132 '.apple_types' hashed accelerator tables.
133
Xing GUO12224162020-04-23 20:06:21 +0800134.. option:: --verbose
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +0000135
136 Display verbose information when linking.
137
Xing GUO12224162020-04-23 20:06:21 +0800138.. option:: --verify
139
140 Run the DWARF verifier on the linked DWARF debug info.
141
142.. option:: -v, --version
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +0000143
144 Display the version of the tool.
145
146.. option:: -y
147
148 Treat *executable* as a YAML debug-map rather than an executable.
149
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +0000150EXIT STATUS
151-----------
152
153:program:`dsymutil` returns 0 if the DWARF debug information was linked
154successfully. Otherwise, it returns 1.
155
156SEE ALSO
157--------
158
159:manpage:`llvm-dwarfdump(1)`