1LLVM-SYMBOLIZER(1)                   LLVM                   LLVM-SYMBOLIZER(1)
2
3
4

NAME

6       llvm-symbolizer - convert addresses into source code locations
7

SYNOPSIS

9       llvm-symbolizer [options]
10

DESCRIPTION

12       llvm-symbolizer reads object file names and addresses from standard in‐
13       put and prints corresponding source code locations to standard  output.
14       If  object file is specified in command line, llvm-symbolizer processes
15       only addresses from standard input, the rest is output verbatim.   This
16       program uses debug info sections and symbol table in the object files.
17

EXAMPLE

19          $ cat addr.txt
20          a.out 0x4004f4
21          /tmp/b.out 0x400528
22          /tmp/c.so 0x710
23          /tmp/mach_universal_binary:i386 0x1f84
24          /tmp/mach_universal_binary:x86_64 0x100000f24
25          $ llvm-symbolizer < addr.txt
26          main
27          /tmp/a.cc:4
28
29          f(int, int)
30          /tmp/b.cc:11
31
32          h_inlined_into_g
33          /tmp/header.h:2
34          g_inlined_into_f
35          /tmp/header.h:7
36          f_inlined_into_main
37          /tmp/source.cc:3
38          main
39          /tmp/source.cc:8
40
41          _main
42          /tmp/source_i386.cc:8
43
44          _main
45          /tmp/source_x86_64.cc:8
46          $ cat addr2.txt
47          0x4004f4
48          0x401000
49          $ llvm-symbolizer -obj=a.out < addr2.txt
50          main
51          /tmp/a.cc:4
52
53          foo(int)
54          /tmp/a.cc:12
55          $cat addr.txt
56          0x40054d
57          $llvm-symbolizer -inlining -print-address -pretty-print -obj=addr.exe < addr.txt
58          0x40054d: inc at /tmp/x.c:3:3
59           (inlined by) main at /tmp/x.c:9:0
60          $llvm-symbolizer -inlining -pretty-print -obj=addr.exe < addr.txt
61          inc at /tmp/x.c:3:3
62           (inlined by) main at /tmp/x.c:9:0
63

OPTIONS

65       -obj, -exe, -e
66              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, -C
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, -addresses, -a
99              Print  address  before  the  source  code  location. Defaults to
100              false.
101
102       -pretty-print, -p
103              Print human readable output. If -inlining is specified,  enclos‐
104              ing scope is prefixed by (inlined by). Refer to listed examples.
105

EXIT STATUS

107       llvm-symbolizer  returns 0. Other exit codes imply internal program er‐
108       ror.
109

AUTHOR

111       Maintained by the LLVM Team (https://llvm.org/).
112
114       2003-2022, LLVM Project
115
116
117
118
1198                                 2022-01-20                LLVM-SYMBOLIZER(1)
Impressum