1 dsymutil - manipulate archived DWARF debug symbol files
2 =======================================================
9 | :program:`dsymutil` [*options*] *executable*
14 :program:`dsymutil` links the DWARF debug information found in the object files
15 for an executable *executable* by using debug symbols information contained in
16 its symbol table. By default, the linked debug information is placed in a
17 ``.dSYM`` bundle with the same name as the executable.
21 .. option:: --accelerator=<accelerator type>
23 Specify the desired type of accelerator table. Valid options are 'Apple',
24 'Dwarf', 'Default' and 'None'.
26 .. option:: --arch <arch>
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.
35 .. option:: --build-variant-suffix <suffix=buildvariant>
37 Specify the build variant suffix used to build the executable file.
38 There can be multiple variants for the binary of a product, each built
39 slightly differently. The most common build variants are 'debug' and
40 'profile'. Setting the DYLD_IMAGE_SUFFIX environment variable will
41 cause dyld to load the specified variant at runtime.
43 .. option:: --dump-debug-map
45 Dump the *executable*'s debug-map (the list of the object files containing the
46 debug information) in YAML format and exit. No DWARF link will take place.
50 Specify a directory that contain dSYM files to search for.
51 This is used for mergeable libraries, so dsymutil knows where to look
52 for dSYM files with debug information about symbols present in those
57 Use a 64-bit header when emitting universal binaries.
59 .. option:: --flat, -f
61 Produce a flat dSYM file. A ``.dwarf`` extension will be appended to the
62 executable name unless the output file is specified using the ``-o`` option.
64 .. option:: --gen-reproducer
66 Generate a reproducer consisting of the input object files. Alias for
67 --reproducer=GenerateOnExit.
69 .. option:: --help, -h
71 Print this help output.
73 .. option:: --keep-function-for-static
75 Make a static variable keep the enclosing function even if it would have been
78 .. option:: --minimize, -z
80 When used when creating a dSYM file, this option will suppress the emission of
81 the .debug_inlines, .debug_pubnames, and .debug_pubtypes sections since
82 dsymutil currently has better equivalents: .apple_names and .apple_types. When
83 used in conjunction with ``--update`` option, this option will cause redundant
84 accelerator tables to be removed.
88 Do not use ODR (One Definition Rule) for uniquing C++ types.
90 .. option:: --no-output
92 Do the link in memory, but do not emit the result file.
94 .. option:: --no-swiftmodule-timestamp
96 Don't check the timestamp for swiftmodule files.
98 .. option:: --num-threads <threads>, -j <threads>
100 Specifies the maximum number (``n``) of simultaneous threads to use when
101 linking multiple architectures.
103 .. option:: --object-prefix-map <prefix=remapped>
105 Remap object file paths (but no source paths) before processing. Use
106 this for Clang objects where the module cache location was remapped using
107 ``-fdebug-prefix-map``; to help dsymutil find the Clang module cache.
109 .. option:: --oso-prepend-path <path>
111 Specifies a ``path`` to prepend to all debug symbol object file paths.
113 .. option:: --out <filename>, -o <filename>
115 Specifies an alternate ``path`` to place the dSYM bundle. The default dSYM
116 bundle path is created by appending ``.dSYM`` to the executable name.
118 .. option:: --remarks-drop-without-debug
120 Drop remarks without valid debug locations. Without this flags, all remarks are kept.
122 .. option:: --remarks-output-format <format>
124 Specify the format to be used when serializing the linked remarks.
126 .. option:: --remarks-prepend-path <path>
128 Specify a directory to prepend the paths of the external remark files.
130 .. option:: --reproducer <mode>
132 Specify the reproducer generation mode. Valid options are 'GenerateOnExit',
133 'GenerateOnCrash', 'Use', 'Off'.
135 .. option:: --statistics
137 Print statistics about the contribution of each object file to the linked
138 debug info. This prints a table after linking with the object file name, the
139 size of the debug info in the object file (in bytes) and the size contributed
140 (in bytes) to the linked dSYM. The table is sorted by the output size listing
141 the object files with the largest contribution first.
143 .. option:: --symbol-map <bcsymbolmap>
145 Update the existing dSYMs inplace using symbol map specified.
147 .. option:: -s, --symtab
149 Dumps the symbol table found in *executable* or object file(s) and exits.
153 Output textual assembly instead of a binary dSYM companion file.
155 .. option:: --toolchain <toolchain>
157 Embed the toolchain in the dSYM bundle's property list.
159 .. option:: -u, --update
161 Update an existing dSYM file to contain the latest accelerator tables and
162 other DWARF optimizations. This option will rebuild the '.apple_names' and
163 '.apple_types' hashed accelerator tables.
165 .. option:: --use-reproducer <path>
167 Use the object files from the given reproducer path. Alias for
170 .. option:: --verbose
172 Display verbose information when linking.
176 Run the DWARF verifier on the linked DWARF debug info.
178 .. option:: -v, --version
180 Display the version of the tool.
184 Treat *executable* as a YAML debug-map rather than an executable.
189 :program:`dsymutil` returns 0 if the DWARF debug information was linked
190 successfully. Otherwise, it returns 1.
195 :manpage:`llvm-dwarfdump(1)`