1llvm-symbolizer - convert addresses into source code locations 2============================================================== 3 4SYNOPSIS 5-------- 6 7:program:`llvm-symbolizer` [options] 8 9DESCRIPTION 10----------- 11 12:program:`llvm-symbolizer` reads object file names and addresses from standard 13input and prints corresponding source code locations to standard output. 14If object file is specified in command line, :program:`llvm-symbolizer` reads 15only addresses from standard input. This 16program uses debug info sections and symbol table in the object files. 17 18EXAMPLE 19-------- 20 21.. code-block:: console 22 23 $ cat addr.txt 24 a.out 0x4004f4 25 /tmp/b.out 0x400528 26 /tmp/c.so 0x710 27 /tmp/mach_universal_binary:i386 0x1f84 28 /tmp/mach_universal_binary:x86_64 0x100000f24 29 $ llvm-symbolizer < addr.txt 30 main 31 /tmp/a.cc:4 32 33 f(int, int) 34 /tmp/b.cc:11 35 36 h_inlined_into_g 37 /tmp/header.h:2 38 g_inlined_into_f 39 /tmp/header.h:7 40 f_inlined_into_main 41 /tmp/source.cc:3 42 main 43 /tmp/source.cc:8 44 45 _main 46 /tmp/source_i386.cc:8 47 48 _main 49 /tmp/source_x86_64.cc:8 50 $ cat addr2.txt 51 0x4004f4 52 0x401000 53 $ llvm-symbolizer -obj=a.out < addr2.txt 54 main 55 /tmp/a.cc:4 56 57 foo(int) 58 /tmp/a.cc:12 59 60OPTIONS 61------- 62 63.. option:: -obj 64 Path to object file to be symbolized. 65 66.. option:: -functions 67 68 Print function names as well as source file/line locations. Defaults to true. 69 70.. option:: -use-symbol-table 71 72 Prefer function names stored in symbol table to function names 73 in debug info sections. Defaults to true. 74 75.. option:: -demangle 76 77 Print demangled function names. Defaults to true. 78 79.. option:: -inlining 80 81 If a source code location is in an inlined function, prints all the 82 inlnied frames. Defaults to true. 83 84.. option:: -default-arch 85 86 If a binary contains object files for multiple architectures (e.g. it is a 87 Mach-O universal binary), symbolize the object file for a given architecture. 88 You can also specify architecture by writing ``binary_name:arch_name`` in the 89 input (see example above). If architecture is not specified in either way, 90 address will not be symbolized. Defaults to empty string. 91 92EXIT STATUS 93----------- 94 95:program:`llvm-symbolizer` returns 0. Other exit codes imply internal program error. 96