2017-11-02 19:44:54 +01:00
|
|
|
dsymutil - manipulate archived DWARF debug symbol files
|
|
|
|
=======================================================
|
|
|
|
|
[docs][tools] Add missing "program" tags to rst files
Sphinx allows for definitions of command-line options using
`.. option <name>` and references to those options via `:option:<name>`.
However, it looks like there is no scoping of these options by default,
meaning that links can end up pointing to incorrect documents. See for
example the llvm-mca document, which contains references to -o that,
prior to this patch, pointed to a different document. What's worse is
that these links appear to be non-deterministic in which one is picked
(on my machine, some references end up pointing to opt, whereas on the
live docs, they point to llvm-dwarfdump, for example).
The fix is to add the .. program <name> tag. This essentially namespaces
the options (definitions and references) to the named program, ensuring
that the links are kept correct.
Reviwed by: andreadb
Differential Revision: https://reviews.llvm.org/D63873
llvm-svn: 364538
2019-06-27 15:24:46 +02:00
|
|
|
.. program:: dsymutil
|
|
|
|
|
2017-11-02 19:44:54 +01:00
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
|
|
|
|
| :program:`dsymutil` [*options*] *executable*
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
|
|
|
|
:program:`dsymutil` links the DWARF debug information found in the object files
|
|
|
|
for an executable *executable* by using debug symbols information contained in
|
|
|
|
its symbol table. By default, the linked debug information is placed in a
|
|
|
|
``.dSYM`` bundle with the same name as the executable.
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2020-04-23 14:06:21 +02:00
|
|
|
.. option:: --accelerator=<accelerator type>
|
|
|
|
|
|
|
|
Specify the desired type of accelerator table. Valid options are 'Apple',
|
|
|
|
'Dwarf' and 'Default'.
|
|
|
|
|
2020-05-18 20:34:09 +02:00
|
|
|
.. option:: --arch <arch>
|
2017-11-02 19:44:54 +01:00
|
|
|
|
|
|
|
Link DWARF debug information only for specified CPU architecture types.
|
|
|
|
Architectures may be specified by name. When using this option, an error will
|
|
|
|
be returned if any architectures can not be properly linked. This option can
|
|
|
|
be specified multiple times, once for each desired architecture. All CPU
|
|
|
|
architectures will be linked by default and any architectures that can't be
|
|
|
|
properly linked will cause :program:`dsymutil` to return an error.
|
|
|
|
|
2017-11-06 17:52:05 +01:00
|
|
|
.. option:: --dump-debug-map
|
2017-11-02 19:44:54 +01:00
|
|
|
|
2017-11-06 17:52:05 +01:00
|
|
|
Dump the *executable*'s debug-map (the list of the object files containing the
|
2017-11-02 19:44:54 +01:00
|
|
|
debug information) in YAML format and exit. Not DWARF link will take place.
|
|
|
|
|
2020-05-18 20:34:09 +02:00
|
|
|
.. option:: --flat, -f
|
2017-11-02 19:44:54 +01:00
|
|
|
|
|
|
|
Produce a flat dSYM file. A ``.dwarf`` extension will be appended to the
|
2020-04-23 14:06:21 +02:00
|
|
|
executable name unless the output file is specified using the ``-o`` option.
|
2017-11-02 19:44:54 +01:00
|
|
|
|
2020-05-21 19:57:53 +02:00
|
|
|
.. option:: --gen-reproducer
|
|
|
|
|
|
|
|
Generate a reproducer consisting of the input object files.
|
|
|
|
|
2020-05-18 20:34:09 +02:00
|
|
|
.. option:: --help, -h
|
2018-01-30 20:54:16 +01:00
|
|
|
|
2020-04-23 14:06:21 +02:00
|
|
|
Print this help output.
|
|
|
|
|
2021-04-27 03:20:49 +02:00
|
|
|
.. option:: --keep-function-for-static
|
|
|
|
|
|
|
|
Make a static variable keep the enclosing function even if it would have been
|
|
|
|
omitted otherwise.
|
|
|
|
|
2020-05-18 20:34:09 +02:00
|
|
|
.. option:: --minimize, -z
|
2020-04-23 14:06:21 +02:00
|
|
|
|
2020-05-18 20:34:09 +02:00
|
|
|
When used when creating a dSYM file, this option will suppress the emission of
|
|
|
|
the .debug_inlines, .debug_pubnames, and .debug_pubtypes sections since
|
|
|
|
dsymutil currently has better equivalents: .apple_names and .apple_types. When
|
|
|
|
used in conjunction with ``--update`` option, this option will cause redundant
|
|
|
|
accelerator tables to be removed.
|
2018-01-30 20:54:16 +01:00
|
|
|
|
2017-11-06 17:52:05 +01:00
|
|
|
.. option:: --no-odr
|
2017-11-02 19:44:54 +01:00
|
|
|
|
|
|
|
Do not use ODR (One Definition Rule) for uniquing C++ types.
|
|
|
|
|
2017-11-06 17:52:05 +01:00
|
|
|
.. option:: --no-output
|
2017-11-02 19:44:54 +01:00
|
|
|
|
|
|
|
Do the link in memory, but do not emit the result file.
|
|
|
|
|
2017-11-06 17:52:05 +01:00
|
|
|
.. option:: --no-swiftmodule-timestamp
|
2017-11-02 19:44:54 +01:00
|
|
|
|
|
|
|
Don't check the timestamp for swiftmodule files.
|
|
|
|
|
2020-05-18 20:34:09 +02:00
|
|
|
.. option:: --num-threads <threads>, -j <threads>
|
|
|
|
|
|
|
|
Specifies the maximum number (``n``) of simultaneous threads to use when
|
|
|
|
linking multiple architectures.
|
|
|
|
|
|
|
|
.. option:: --object-prefix-map <prefix=remapped>
|
2017-11-02 19:44:54 +01:00
|
|
|
|
2020-04-23 14:06:21 +02:00
|
|
|
Remap object file paths (but no source paths) before processing. Use
|
|
|
|
this for Clang objects where the module cache location was remapped using
|
|
|
|
``-fdebug-prefix-map``; to help dsymutil find the Clang module cache.
|
2017-11-02 19:44:54 +01:00
|
|
|
|
2020-05-18 20:34:09 +02:00
|
|
|
.. option:: --oso-prepend-path <path>
|
2017-11-02 19:44:54 +01:00
|
|
|
|
|
|
|
Specifies a ``path`` to prepend to all debug symbol object file paths.
|
|
|
|
|
2020-05-18 20:34:09 +02:00
|
|
|
.. option:: --out <filename>, -o <filename>
|
2020-03-18 23:31:39 +01:00
|
|
|
|
2020-04-23 14:06:21 +02:00
|
|
|
Specifies an alternate ``path`` to place the dSYM bundle. The default dSYM
|
|
|
|
bundle path is created by appending ``.dSYM`` to the executable name.
|
2020-05-07 04:38:30 +02:00
|
|
|
|
2018-04-02 12:40:43 +02:00
|
|
|
.. option:: --papertrail
|
|
|
|
|
|
|
|
When running dsymutil as part of your build system, it can be desirable for
|
|
|
|
warnings to be part of the end product, rather than just being emitted to the
|
|
|
|
output stream. When enabled warnings are embedded in the linked DWARF debug
|
|
|
|
information.
|
|
|
|
|
2020-04-23 14:06:21 +02:00
|
|
|
.. option:: --remarks-output-format <format>
|
|
|
|
|
|
|
|
Specify the format to be used when serializing the linked remarks.
|
|
|
|
|
|
|
|
.. option:: --remarks-prepend-path <path>
|
|
|
|
|
|
|
|
Specify a directory to prepend the paths of the external remark files.
|
|
|
|
|
2020-05-07 04:38:30 +02:00
|
|
|
.. option:: --statistics
|
|
|
|
|
|
|
|
Print statistics about the contribution of each object file to the linked
|
|
|
|
debug info. This prints a table after linking with the object file name, the
|
|
|
|
size of the debug info in the object file (in bytes) and the size contributed
|
|
|
|
(in bytes) to the linked dSYM. The table is sorted by the output size listing
|
2020-09-10 18:45:13 +02:00
|
|
|
the object files with the largest contribution first.
|
2020-05-07 04:38:30 +02:00
|
|
|
|
2020-04-23 14:06:21 +02:00
|
|
|
.. option:: --symbol-map <bcsymbolmap>
|
|
|
|
|
|
|
|
Update the existing dSYMs inplace using symbol map specified.
|
|
|
|
|
2017-11-06 17:52:05 +01:00
|
|
|
.. option:: -s, --symtab
|
2017-11-02 19:44:54 +01:00
|
|
|
|
2017-11-06 17:52:05 +01:00
|
|
|
Dumps the symbol table found in *executable* or object file(s) and exits.
|
2017-11-02 19:44:54 +01:00
|
|
|
|
2020-04-23 14:06:21 +02:00
|
|
|
.. option:: -S
|
|
|
|
|
|
|
|
Output textual assembly instead of a binary dSYM companion file.
|
|
|
|
|
|
|
|
.. option:: --toolchain <toolchain>
|
2018-03-08 11:39:12 +01:00
|
|
|
|
|
|
|
Embed the toolchain in the dSYM bundle's property list.
|
|
|
|
|
2018-02-08 11:48:54 +01:00
|
|
|
.. option:: -u, --update
|
|
|
|
|
|
|
|
Update an existing dSYM file to contain the latest accelerator tables and
|
|
|
|
other DWARF optimizations. This option will rebuild the '.apple_names' and
|
|
|
|
'.apple_types' hashed accelerator tables.
|
|
|
|
|
2020-05-21 19:57:53 +02:00
|
|
|
.. option:: --use-reproducer <path>
|
|
|
|
|
|
|
|
Use the object files from the given reproducer path.
|
|
|
|
|
2020-04-23 14:06:21 +02:00
|
|
|
.. option:: --verbose
|
2017-11-02 19:44:54 +01:00
|
|
|
|
|
|
|
Display verbose information when linking.
|
|
|
|
|
2020-04-23 14:06:21 +02:00
|
|
|
.. option:: --verify
|
|
|
|
|
|
|
|
Run the DWARF verifier on the linked DWARF debug info.
|
|
|
|
|
|
|
|
.. option:: -v, --version
|
2017-11-02 19:44:54 +01:00
|
|
|
|
|
|
|
Display the version of the tool.
|
|
|
|
|
|
|
|
.. option:: -y
|
|
|
|
|
|
|
|
Treat *executable* as a YAML debug-map rather than an executable.
|
|
|
|
|
|
|
|
EXIT STATUS
|
|
|
|
-----------
|
|
|
|
|
|
|
|
:program:`dsymutil` returns 0 if the DWARF debug information was linked
|
|
|
|
successfully. Otherwise, it returns 1.
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
|
|
|
|
:manpage:`llvm-dwarfdump(1)`
|