[all-commits] [llvm/llvm-project] cb1a7d: [symbolizer] Support symbol+offset lookup (#75067)

Serge Pavlov via All-commits all-commits at lists.llvm.org
Fri Dec 15 02:35:47 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb1a7d28e608a107d001e11e0e0baa8b4fea97b5
      https://github.com/llvm/llvm-project/commit/cb1a7d28e608a107d001e11e0e0baa8b4fea97b5
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2023-12-15 (Fri, 15 Dec 2023)

  Changed paths:
    M llvm/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h
    M llvm/include/llvm/DebugInfo/Symbolize/SymbolizableObjectFile.h
    M llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
    M llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
    M llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
    M llvm/test/tools/llvm-symbolizer/symbol-search.test
    M llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
    M llvm/unittests/ProfileData/MemProfTest.cpp

  Log Message:
  -----------
  [symbolizer] Support symbol+offset lookup (#75067)

GNU addr2line supports lookup by symbol name in addition to the existing
address lookup. llvm-symbolizer starting from
e144ae54dcb96838a6176fd9eef21028935ccd4f supports lookup by symbol name.
This change extends this lookup with possibility to specify optional
offset.

Now the address for which source information is searched for can be
specified with offset:

    llvm-symbolize --obj=abc.so "SYMBOL func_22+0x12"

It decreases the gap in features of llvm-symbolizer and GNU addr2line.
This lookup now is supported for code only.

Migrated from: https://reviews.llvm.org/D139859
Pull request: https://github.com/llvm/llvm-project/pull/75067




More information about the All-commits mailing list