[all-commits] [llvm/llvm-project] 67f63f: [lldb/DWARF] Re-enable basic dwp support

Pavel Labath via All-commits all-commits at lists.llvm.org
Mon Feb 17 05:15:26 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 67f63f3f7c27a8438236538fdda75e32c819cc54
      https://github.com/llvm/llvm-project/commit/67f63f3f7c27a8438236538fdda75e32c819cc54
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-02-17 (Mon, 17 Feb 2020)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
    R lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp
    R lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h
    R lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp
    R lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h
    A lldb/test/Shell/SymbolFile/DWARF/dwp.s
    M lldb/unittests/TestingSupport/Symbol/YAMLModuleTester.cpp

  Log Message:
  -----------
  [lldb/DWARF] Re-enable basic dwp support

Summary:
This patch removes the bitrotted SymbolFileDWARF(Dwo)Dwp classes, and
replaces them with dwp support implemented directly inside
SymbolFileDWARFDwo, in a manner mirroring the implementation in llvm.
This patch does:
- add support for the .debug_cu_index section to our DWARFContext
- adds a llvm::DWARFUnitIndex argument to the DWARFUnit constructors.
  This argument is used to look up the offsets of the debug_info and
  debug_abbrev contributions in the sections of the dwp file.
- makes sure the creation of the DebugInfo object as well as the initial
  discovery of DWARFUnits is thread-safe, as we can now call this
  concurrently when doing parallel indexing.

This patch does not:
- use the DWARFUnitIndex to search for other kinds of contributions
  (debug_loc, debug_ranges, etc.). This means that units which reference
  these sections will not work correctly. These will be handled by
  follow-up patches, but even the present level of support is sufficient
  to enable basic functionality.
- Make the llvm::DWARFContext thread-safe. Right now, it just avoids this
  problem by ensuring everything is initialized ahead of time. However,
  this is something we will run into more often as we try to use more of
  llvm, and so I plan to start looking into our options here.

Reviewers: JDevlieghere, aprantl, clayborg

Subscribers: mgorny, mgrang, lldb-commits

Tags: #lldb

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


  Commit: b2d64b698f8771290e42e558a1e6cc645375b90c
      https://github.com/llvm/llvm-project/commit/b2d64b698f8771290e42e558a1e6cc645375b90c
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-02-17 (Mon, 17 Feb 2020)

  Changed paths:
    M lldb/source/Target/ABI.cpp

  Log Message:
  -----------
  [lldb] Fix build error from 07355c1c08b

The error is: no matching function for call to 'transform(std::string&, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'

The fix: replace llvm::transform with an equally simple hand-rolled
loop.


Compare: https://github.com/llvm/llvm-project/compare/35367e06b846...b2d64b698f87


More information about the All-commits mailing list