[all-commits] [llvm/llvm-project] 27c477: [symbolizer] Treat invalid address as addr2line does

Serge Pavlov via All-commits all-commits at lists.llvm.org
Wed Mar 29 08:29:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 27c4777f41d2ab204c1cf84ff1cccd5ba41354da
      https://github.com/llvm/llvm-project/commit/27c4777f41d2ab204c1cf84ff1cccd5ba41354da
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h
    M llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp
    M llvm/test/tools/llvm-symbolizer/flush-output.s
    M llvm/test/tools/llvm-symbolizer/input-base.test
    M llvm/test/tools/llvm-symbolizer/invalid-input-address.test
    M llvm/test/tools/llvm-symbolizer/options-from-env.test
    M llvm/test/tools/llvm-symbolizer/output-style-empty-line.test
    M llvm/test/tools/llvm-symbolizer/sym.test

  Log Message:
  -----------
  [symbolizer] Treat invalid address as addr2line does

llvm-symbolizer echoed input if it was not recognized as a valid address.
This behavior was extended to llvm-addr2line as well. GNU addr2line in
this case optputs "??:0". This difference prevents implementation of
symbol+offset lookup available in the recent versions of GNU binutils.
In that case a string that is not an address may be a symbol.

This change make reaction of llvm-addr2line on unrecognized input closer
to GNU addr2line.


  Commit: 90025187f014c4699b9869428a06e683c1bac232
      https://github.com/llvm/llvm-project/commit/90025187f014c4699b9869428a06e683c1bac232
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp

  Log Message:
  -----------
  [symbolizer] Factor out conversion DILineInfo->JSON. NFC

Move the conversion of DILineInfo to JSON into a separate function, so
it can be used in other places too.

This is a prerequisite patch for implementation of symbol+offset lookup.

Differential Revision: https://reviews.llvm.org/D147112


Compare: https://github.com/llvm/llvm-project/compare/0e2ed90516ee...90025187f014


More information about the All-commits mailing list