blob: 2f638daf2ae3feb8e772bd59779a0e2b8050cc76 [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-------
Adrian Prantl3c6491d2017-11-06 16:52:05 +000021.. option:: --arch=<arch>
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000022
23 Link DWARF debug information only for specified CPU architecture types.
24 Architectures may be specified by name. When using this option, an error will
25 be returned if any architectures can not be properly linked. This option can
26 be specified multiple times, once for each desired architecture. All CPU
27 architectures will be linked by default and any architectures that can't be
28 properly linked will cause :program:`dsymutil` to return an error.
29
Adrian Prantl3c6491d2017-11-06 16:52:05 +000030.. option:: --dump-debug-map
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000031
Adrian Prantl3c6491d2017-11-06 16:52:05 +000032 Dump the *executable*'s debug-map (the list of the object files containing the
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000033 debug information) in YAML format and exit. Not DWARF link will take place.
34
Adrian Prantl3c6491d2017-11-06 16:52:05 +000035.. option:: -f, --flat
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000036
37 Produce a flat dSYM file. A ``.dwarf`` extension will be appended to the
38 executable name unless the output file is specified using the -o option.
39
Jonas Devliegherecca341b2018-01-30 19:54:16 +000040.. option:: -z, --minimize
41
42 When used when creating a dSYM file, this option will suppress the emission of
43 the .debug_inlines, .debug_pubnames, and .debug_pubtypes sections since
Jonas Devlieghered4034d22018-02-08 10:48:54 +000044 dsymutil currently has better equivalents: .apple_names and .apple_types. When
45 used in conjunction with --update option, this option will cause redundant
46 accelerator tables to be removed.
Jonas Devliegherecca341b2018-01-30 19:54:16 +000047
Adrian Prantl3c6491d2017-11-06 16:52:05 +000048.. option:: --no-odr
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000049
50 Do not use ODR (One Definition Rule) for uniquing C++ types.
51
Adrian Prantl3c6491d2017-11-06 16:52:05 +000052.. option:: --no-output
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000053
54 Do the link in memory, but do not emit the result file.
55
Adrian Prantl3c6491d2017-11-06 16:52:05 +000056.. option:: --no-swiftmodule-timestamp
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000057
58 Don't check the timestamp for swiftmodule files.
59
Adrian Prantl3c6491d2017-11-06 16:52:05 +000060.. option:: -j <n>, --num-threads=<n>
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000061
62 Specifies the maximum number (``n``) of simultaneous threads to use when
63 linking multiple architectures.
64
65.. option:: -o <filename>
66
67 Specifies an alternate ``path`` to place the dSYM bundle. The default dSYM
68 bundle path is created by appending ``.dSYM`` to the executable name.
69
Adrian Prantl3c6491d2017-11-06 16:52:05 +000070.. option:: --oso-prepend-path=<path>
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000071
72 Specifies a ``path`` to prepend to all debug symbol object file paths.
73
Adrian Prantled8ad6e2020-03-18 15:31:39 -070074.. option:: --object-prefix-map=<prefix=remapped>
75
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.
79
Jonas Devlieghere9e3e7a92018-04-02 10:40:43 +000080.. option:: --papertrail
81
82 When running dsymutil as part of your build system, it can be desirable for
83 warnings to be part of the end product, rather than just being emitted to the
84 output stream. When enabled warnings are embedded in the linked DWARF debug
85 information.
86
Adrian Prantl3c6491d2017-11-06 16:52:05 +000087.. option:: -s, --symtab
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000088
Adrian Prantl3c6491d2017-11-06 16:52:05 +000089 Dumps the symbol table found in *executable* or object file(s) and exits.
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +000090
Jonas Devlieghere2902a212018-03-08 10:39:12 +000091.. option:: --toolchain
92
93 Embed the toolchain in the dSYM bundle's property list.
94
Jonas Devlieghered4034d22018-02-08 10:48:54 +000095.. option:: -u, --update
96
97 Update an existing dSYM file to contain the latest accelerator tables and
98 other DWARF optimizations. This option will rebuild the '.apple_names' and
99 '.apple_types' hashed accelerator tables.
100
Adrian Prantl3c6491d2017-11-06 16:52:05 +0000101.. option:: -v, --verbose
Jonas Devliegherefb7bf1d2017-11-02 18:44:54 +0000102
103 Display verbose information when linking.
104
105.. option:: --version
106
107 Display the version of the tool.
108
109.. option:: -y
110
111 Treat *executable* as a YAML debug-map rather than an executable.
112
113EXIT STATUS
114-----------
115
116:program:`dsymutil` returns 0 if the DWARF debug information was linked
117successfully. Otherwise, it returns 1.
118
119SEE ALSO
120--------
121
122:manpage:`llvm-dwarfdump(1)`