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
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

EXAMPLE

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

OPTIONS

66       -obj, -exe, -e
67              Path to object file to be symbolized.
68
69       -functions=[none|short|linkage]
70              Specify the way function names are printed (omit function  name,
71              print  short  function name, or print full linkage name, respec‐
72              tively).  Defaults to linkage.
73
74       -use-symbol-table
75              Prefer function names stored in symbol table to  function  names
76              in debug info sections. Defaults to true.
77
78       -demangle, -C
79              Print demangled function names. Defaults to true.
80
81       -inlining
82              If  a source code location is in an inlined function, prints all
83              the inlnied frames. Defaults to true.
84
85       -default-arch
86              If a binary contains object  files  for  multiple  architectures
87              (e.g.  it  is  a  Mach-O universal binary), symbolize the object
88              file for a given architecture.  You can also  specify  architec‐
89              ture  by writing binary_name:arch_name in the input (see example
90              above). If architecture is not specified in either way,  address
91              will not be symbolized. Defaults to empty string.
92
93       -dsym-hint=<path/to/file.dSYM>
94              (Darwin-only flag). If the debug info for a binary isn't present
95              in the default location, look for the debug info  at  the  .dSYM
96              path  provided  via  the  -dsym-hint flag. This flag can be used
97              multiple times.
98
99       -print-address, -addresses, -a
100              Print address before  the  source  code  location.  Defaults  to
101              false.
102
103       -pretty-print, -p
104              Print  human readable output. If -inlining is specified, enclos‐
105              ing scope is prefixed by (inlined by). Refer to listed examples.
106

EXIT STATUS

108       llvm-symbolizer returns 0. Other  exit  codes  imply  internal  program
109       error.
110

AUTHOR

112       Maintained by the LLVM Team (https://llvm.org/).
113
115       2003-2019, LLVM Project
116
117
118
119
1208                                 2019-04-25                LLVM-SYMBOLIZER(1)
Impressum