1 llvm-symbolizer - convert addresses into source code locations
2 ==============================================================
7 :program:`llvm-symbolizer` [options]
12 :program:`llvm-symbolizer` reads object file names and addresses from standard
13 input and prints corresponding source code locations to standard output.
14 If object file is specified in command line, :program:`llvm-symbolizer`
15 processes only addresses from standard input, the rest is output verbatim.
16 This program uses debug info sections and symbol table in the object files.
21 .. code-block:: console
27 /tmp/mach_universal_binary:i386 0x1f84
28 /tmp/mach_universal_binary:x86_64 0x100000f24
29 $ llvm-symbolizer < addr.txt
49 /tmp/source_x86_64.cc:8
53 $ llvm-symbolizer -obj=a.out < addr2.txt
61 $llvm-symbolizer -inlining -print-address -pretty-print -obj=addr.exe < addr.txt
62 0x40054d: inc at /tmp/x.c:3:3
63 (inlined by) main at /tmp/x.c:9:0
64 $llvm-symbolizer -inlining -pretty-print -obj=addr.exe < addr.txt
66 (inlined by) main at /tmp/x.c:9:0
71 .. option:: -obj, -exe, -e
73 Path to object file to be symbolized.
75 .. option:: -functions[=<none|short|linkage>], -f
77 Specify the way function names are printed (omit function name,
78 print short function name, or print full linkage name, respectively).
79 Defaults to ``linkage``.
81 .. option:: -use-symbol-table
83 Prefer function names stored in symbol table to function names
84 in debug info sections. Defaults to true.
86 .. option:: -demangle, -C
88 Print demangled function names. Defaults to true.
90 .. option:: -no-demangle
92 Don't print demangled function names.
94 .. option:: -inlining, -inlines, -i
96 If a source code location is in an inlined function, prints all the
97 inlnied frames. Defaults to true.
99 .. option:: -default-arch
101 If a binary contains object files for multiple architectures (e.g. it is a
102 Mach-O universal binary), symbolize the object file for a given architecture.
103 You can also specify architecture by writing ``binary_name:arch_name`` in the
104 input (see example above). If architecture is not specified in either way,
105 address will not be symbolized. Defaults to empty string.
107 .. option:: -dsym-hint=<path/to/file.dSYM>
109 (Darwin-only flag). If the debug info for a binary isn't present in the default
110 location, look for the debug info at the .dSYM path provided via the
111 ``-dsym-hint`` flag. This flag can be used multiple times.
113 .. option:: -print-address, -addresses, -a
115 Print address before the source code location. Defaults to false.
117 .. option:: -pretty-print, -p
119 Print human readable output. If ``-inlining`` is specified, enclosing scope is
120 prefixed by (inlined by). Refer to listed examples.
122 .. option:: -basenames, -s
124 Strip directories when printing the file path.
126 .. option:: -adjust-vma=<offset>
128 Add the specified offset to object file addresses when performing lookups. This
129 can be used to perform lookups as if the object were relocated by the offset.
134 :program:`llvm-symbolizer` returns 0. Other exit codes imply internal program error.