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

EXIT STATUS

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

AUTHOR

110       Maintained by The LLVM Team (http://llvm.org/).
111
113       2003-2021, LLVM Project
114
115
116
117
1187                                 2021-07-22                LLVM-SYMBOLIZER(1)
Impressum