1LLVM-SYMBOLIZER(1) LLVM LLVM-SYMBOLIZER(1)
2
3
4
6 llvm-symbolizer - convert addresses into source code locations
7
9 llvm-symbolizer [options]
10
12 llvm-symbolizer reads object file names and addresses from standard
13 input and prints corresponding source code locations to standard out‐
14 put. If object file is specified in command line, llvm-symbolizer pro‐
15 cesses only addresses from standard input, the rest is output verbatim.
16 This program uses debug info sections and symbol table in the object
17 files.
18
20 $ cat addr.txt
21 a.out 0x4004f4
22 /tmp/b.out 0x400528
23 /tmp/c.so 0x710
24 /tmp/mach_universal_binary:i386 0x1f84
25 /tmp/mach_universal_binary:x86_64 0x100000f24
26 $ llvm-symbolizer < addr.txt
27 main
28 /tmp/a.cc:4
29
30 f(int, int)
31 /tmp/b.cc:11
32
33 h_inlined_into_g
34 /tmp/header.h:2
35 g_inlined_into_f
36 /tmp/header.h:7
37 f_inlined_into_main
38 /tmp/source.cc:3
39 main
40 /tmp/source.cc:8
41
42 _main
43 /tmp/source_i386.cc:8
44
45 _main
46 /tmp/source_x86_64.cc:8
47 $ cat addr2.txt
48 0x4004f4
49 0x401000
50 $ llvm-symbolizer -obj=a.out < addr2.txt
51 main
52 /tmp/a.cc:4
53
54 foo(int)
55 /tmp/a.cc:12
56 $cat addr.txt
57 0x40054d
58 $llvm-symbolizer -inlining -print-address -pretty-print -obj=addr.exe < addr.txt
59 0x40054d: inc at /tmp/x.c:3:3
60 (inlined by) main at /tmp/x.c:9:0
61 $llvm-symbolizer -inlining -pretty-print -obj=addr.exe < addr.txt
62 inc at /tmp/x.c:3:3
63 (inlined by) main at /tmp/x.c:9:0
64
66 -obj Path to object file to be symbolized.
67
68 -functions=[none|short|linkage]
69 Specify the way function names are printed (omit function name,
70 print short function name, or print full linkage name, respec‐
71 tively). Defaults to linkage.
72
73 -use-symbol-table
74 Prefer function names stored in symbol table to function names
75 in debug info sections. Defaults to true.
76
77 -demangle
78 Print demangled function names. Defaults to true.
79
80 -inlining
81 If a source code location is in an inlined function, prints all
82 the inlnied frames. Defaults to true.
83
84 -default-arch
85 If a binary contains object files for multiple architectures
86 (e.g. it is a Mach-O universal binary), symbolize the object
87 file for a given architecture. You can also specify architec‐
88 ture by writing binary_name:arch_name in the input (see example
89 above). If architecture is not specified in either way, address
90 will not be symbolized. Defaults to empty string.
91
92 -dsym-hint=<path/to/file.dSYM>
93 (Darwin-only flag). If the debug info for a binary isn't present
94 in the default location, look for the debug info at the .dSYM
95 path provided via the -dsym-hint flag. This flag can be used
96 multiple times.
97
98 -print-address
99 Print address before the source code location. Defaults to
100 false.
101
102 -pretty-print
103 Print human readable output. If -inlining is specified, enclos‐
104 ing scope is prefixed by (inlined by). Refer to listed examples.
105
107 llvm-symbolizer returns 0. Other exit codes imply internal program
108 error.
109
111 Maintained by The LLVM Team (http://llvm.org/).
112
114 2003-2019, LLVM Project
115
116
117
118
1197 2019-03-19 LLVM-SYMBOLIZER(1)