[PATCH] D60067: [llvm-symbolizer] Add llvm-addr2line.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 07:07:45 PDT 2019


ikudrin created this revision.
ikudrin added reviewers: rupprecht, jhenderson, pcc.
Herald added a subscriber: mgorny.
Herald added a project: LLVM.

llvm-symbolizer, with the latest updates, works very similarly to GNU's addr2line.
The main difference is in the defaults both tools use. In particular:

- llvm-symbolizer has "-I", "-f" and "-C" options ON by default;
- llvm-symbolizer prints line and column while addr2line prints only a line.
- addr2line allows the "-e" option to be grouped.
- With "-f -i=0", llvm-symbolizer replaces the name of an inlined function with the name from the symbol table, i. e., the top caller function in the inlining chain. addr2line preserves the name of the inlined function.

This patch adds an alias for llvm-symbolizer which is tuned to follow
the behavior of addr2line better.


Repository:
  rL LLVM

https://reviews.llvm.org/D60067

Files:
  include/llvm/DebugInfo/Symbolize/DIPrinter.h
  include/llvm/DebugInfo/Symbolize/SymbolizableModule.h
  include/llvm/DebugInfo/Symbolize/Symbolize.h
  lib/DebugInfo/Symbolize/DIPrinter.cpp
  lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
  lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
  lib/DebugInfo/Symbolize/Symbolize.cpp
  test/CMakeLists.txt
  test/tools/llvm-symbolizer/addr2line.test
  test/tools/llvm-symbolizer/demangle.s
  tools/llvm-symbolizer/CMakeLists.txt
  tools/llvm-symbolizer/llvm-symbolizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60067.193076.patch
Type: text/x-patch
Size: 12916 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190401/a4bc2175/attachment.bin>


More information about the llvm-commits mailing list