| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 1 | dsymutil - manipulate archived DWARF debug symbol files |
| 2 | ======================================================= |
| 3 | |
| James Henderson | a056684 | 2019-06-27 13:24:46 +0000 | [diff] [blame] | 4 | .. program:: dsymutil |
| 5 | |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 6 | SYNOPSIS |
| 7 | -------- |
| 8 | |
| 9 | | :program:`dsymutil` [*options*] *executable* |
| 10 | |
| 11 | DESCRIPTION |
| 12 | ----------- |
| 13 | |
| 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. |
| 18 | |
| 19 | OPTIONS |
| 20 | ------- |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 21 | .. option:: --accelerator=<accelerator type> |
| 22 | |
| 23 | Specify the desired type of accelerator table. Valid options are 'Apple', |
| 24 | 'Dwarf' and 'Default'. |
| 25 | |
| Jonas Devlieghere | b7924d6 | 2020-05-18 11:34:09 -0700 | [diff] [blame] | 26 | .. option:: --arch <arch> |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 27 | |
| 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 Prantl | 3c6491d | 2017-11-06 16:52:05 +0000 | [diff] [blame] | 35 | .. option:: --dump-debug-map |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 36 | |
| Adrian Prantl | 3c6491d | 2017-11-06 16:52:05 +0000 | [diff] [blame] | 37 | Dump the *executable*'s debug-map (the list of the object files containing the |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 38 | debug information) in YAML format and exit. Not DWARF link will take place. |
| 39 | |
| Jonas Devlieghere | b7924d6 | 2020-05-18 11:34:09 -0700 | [diff] [blame] | 40 | .. option:: --flat, -f |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 41 | |
| 42 | Produce a flat dSYM file. A ``.dwarf`` extension will be appended to the |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 43 | executable name unless the output file is specified using the ``-o`` option. |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 44 | |
| Jonas Devlieghere | 92fd397 | 2020-05-21 10:57:53 -0700 | [diff] [blame] | 45 | .. option:: --gen-reproducer |
| 46 | |
| 47 | Generate a reproducer consisting of the input object files. |
| 48 | |
| Jonas Devlieghere | b7924d6 | 2020-05-18 11:34:09 -0700 | [diff] [blame] | 49 | .. option:: --help, -h |
| Jonas Devlieghere | cca341b | 2018-01-30 19:54:16 +0000 | [diff] [blame] | 50 | |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 51 | Print this help output. |
| 52 | |
| Jonas Devlieghere | b7924d6 | 2020-05-18 11:34:09 -0700 | [diff] [blame] | 53 | .. option:: --minimize, -z |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 54 | |
| Jonas Devlieghere | b7924d6 | 2020-05-18 11:34:09 -0700 | [diff] [blame] | 55 | When used when creating a dSYM file, this option will suppress the emission of |
| 56 | the .debug_inlines, .debug_pubnames, and .debug_pubtypes sections since |
| 57 | dsymutil currently has better equivalents: .apple_names and .apple_types. When |
| 58 | used in conjunction with ``--update`` option, this option will cause redundant |
| 59 | accelerator tables to be removed. |
| Jonas Devlieghere | cca341b | 2018-01-30 19:54:16 +0000 | [diff] [blame] | 60 | |
| Adrian Prantl | 3c6491d | 2017-11-06 16:52:05 +0000 | [diff] [blame] | 61 | .. option:: --no-odr |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 62 | |
| 63 | Do not use ODR (One Definition Rule) for uniquing C++ types. |
| 64 | |
| Adrian Prantl | 3c6491d | 2017-11-06 16:52:05 +0000 | [diff] [blame] | 65 | .. option:: --no-output |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 66 | |
| 67 | Do the link in memory, but do not emit the result file. |
| 68 | |
| Adrian Prantl | 3c6491d | 2017-11-06 16:52:05 +0000 | [diff] [blame] | 69 | .. option:: --no-swiftmodule-timestamp |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 70 | |
| 71 | Don't check the timestamp for swiftmodule files. |
| 72 | |
| Jonas Devlieghere | b7924d6 | 2020-05-18 11:34:09 -0700 | [diff] [blame] | 73 | .. option:: --num-threads <threads>, -j <threads> |
| 74 | |
| 75 | Specifies the maximum number (``n``) of simultaneous threads to use when |
| 76 | linking multiple architectures. |
| 77 | |
| 78 | .. option:: --object-prefix-map <prefix=remapped> |
| Adrian Prantl | ed8ad6e | 2020-03-18 15:31:39 -0700 | [diff] [blame] | 79 | |
| 80 | Remap object file paths (but no source paths) before processing. Use |
| 81 | this for Clang objects where the module cache location was remapped using |
| 82 | ``-fdebug-prefix-map``; to help dsymutil find the Clang module cache. |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 83 | |
| Jonas Devlieghere | b7924d6 | 2020-05-18 11:34:09 -0700 | [diff] [blame] | 84 | .. option:: --oso-prepend-path <path> |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 85 | |
| 86 | Specifies a ``path`` to prepend to all debug symbol object file paths. |
| 87 | |
| Jonas Devlieghere | b7924d6 | 2020-05-18 11:34:09 -0700 | [diff] [blame] | 88 | .. option:: --out <filename>, -o <filename> |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 89 | |
| 90 | Specifies an alternate ``path`` to place the dSYM bundle. The default dSYM |
| 91 | bundle path is created by appending ``.dSYM`` to the executable name. |
| Jonas Devlieghere | 7fb9bcd | 2020-05-06 19:38:30 -0700 | [diff] [blame] | 92 | |
| Jonas Devlieghere | 9e3e7a9 | 2018-04-02 10:40:43 +0000 | [diff] [blame] | 93 | .. option:: --papertrail |
| 94 | |
| 95 | When running dsymutil as part of your build system, it can be desirable for |
| 96 | warnings to be part of the end product, rather than just being emitted to the |
| 97 | output stream. When enabled warnings are embedded in the linked DWARF debug |
| 98 | information. |
| 99 | |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 100 | .. option:: --remarks-output-format <format> |
| 101 | |
| 102 | Specify the format to be used when serializing the linked remarks. |
| 103 | |
| 104 | .. option:: --remarks-prepend-path <path> |
| 105 | |
| 106 | Specify a directory to prepend the paths of the external remark files. |
| 107 | |
| Jonas Devlieghere | 7fb9bcd | 2020-05-06 19:38:30 -0700 | [diff] [blame] | 108 | .. option:: --statistics |
| 109 | |
| 110 | Print statistics about the contribution of each object file to the linked |
| 111 | debug info. This prints a table after linking with the object file name, the |
| 112 | size of the debug info in the object file (in bytes) and the size contributed |
| 113 | (in bytes) to the linked dSYM. The table is sorted by the output size listing |
| 114 | the obj ect files with the largest contribution first. |
| 115 | |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 116 | .. option:: --symbol-map <bcsymbolmap> |
| 117 | |
| 118 | Update the existing dSYMs inplace using symbol map specified. |
| 119 | |
| Adrian Prantl | 3c6491d | 2017-11-06 16:52:05 +0000 | [diff] [blame] | 120 | .. option:: -s, --symtab |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 121 | |
| Adrian Prantl | 3c6491d | 2017-11-06 16:52:05 +0000 | [diff] [blame] | 122 | Dumps the symbol table found in *executable* or object file(s) and exits. |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 123 | |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 124 | .. option:: -S |
| 125 | |
| 126 | Output textual assembly instead of a binary dSYM companion file. |
| 127 | |
| 128 | .. option:: --toolchain <toolchain> |
| Jonas Devlieghere | 2902a21 | 2018-03-08 10:39:12 +0000 | [diff] [blame] | 129 | |
| 130 | Embed the toolchain in the dSYM bundle's property list. |
| 131 | |
| Jonas Devlieghere | d4034d2 | 2018-02-08 10:48:54 +0000 | [diff] [blame] | 132 | .. option:: -u, --update |
| 133 | |
| 134 | Update an existing dSYM file to contain the latest accelerator tables and |
| 135 | other DWARF optimizations. This option will rebuild the '.apple_names' and |
| 136 | '.apple_types' hashed accelerator tables. |
| 137 | |
| Jonas Devlieghere | 92fd397 | 2020-05-21 10:57:53 -0700 | [diff] [blame] | 138 | .. option:: --use-reproducer <path> |
| 139 | |
| 140 | Use the object files from the given reproducer path. |
| 141 | |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 142 | .. option:: --verbose |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 143 | |
| 144 | Display verbose information when linking. |
| 145 | |
| Xing GUO | 1222416 | 2020-04-23 20:06:21 +0800 | [diff] [blame] | 146 | .. option:: --verify |
| 147 | |
| 148 | Run the DWARF verifier on the linked DWARF debug info. |
| 149 | |
| 150 | .. option:: -v, --version |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 151 | |
| 152 | Display the version of the tool. |
| 153 | |
| 154 | .. option:: -y |
| 155 | |
| 156 | Treat *executable* as a YAML debug-map rather than an executable. |
| 157 | |
| Jonas Devlieghere | fb7bf1d | 2017-11-02 18:44:54 +0000 | [diff] [blame] | 158 | EXIT STATUS |
| 159 | ----------- |
| 160 | |
| 161 | :program:`dsymutil` returns 0 if the DWARF debug information was linked |
| 162 | successfully. Otherwise, it returns 1. |
| 163 | |
| 164 | SEE ALSO |
| 165 | -------- |
| 166 | |
| 167 | :manpage:`llvm-dwarfdump(1)` |