[all-commits] [llvm/llvm-project] cead4e: [symbolizer] Parse DW_TAG_variable DIs to show lin...

Mitch Phillips via All-commits all-commits at lists.llvm.org
Mon May 23 13:30:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cead4eceb01b935fae07bf4a7e91911b344d2fec
      https://github.com/llvm/llvm-project/commit/cead4eceb01b935fae07bf4a7e91911b344d2fec
  Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
  Date:   2022-05-23 (Mon, 23 May 2022)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DIContext.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
    M llvm/include/llvm/DebugInfo/PDB/PDBContext.h
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    M llvm/lib/DebugInfo/PDB/PDBContext.cpp
    M llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp
    M llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
    M llvm/test/DebugInfo/Symbolize/ELF/data-command-symtab.yaml
    A llvm/test/tools/llvm-symbolizer/data-location.yaml
    M llvm/test/tools/llvm-symbolizer/data.s

  Log Message:
  -----------
  [symbolizer] Parse DW_TAG_variable DIs to show line info for globals

Currently, llvm-symbolizer doesn't like to parse .debug_info in order to
show the line info for global variables. addr2line does this. In the
future, I'm looking to migrate AddressSanitizer off of internal metadata
over to using debuginfo, and this is predicated on being able to get the
line info for global variables.

This patch adds the requisite support for getting the line info from the
.debug_info section for symbolizing global variables. This only happens
when you ask for a global variable to be symbolized as data.

Reviewed By: dblaikie

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




More information about the All-commits mailing list