[Lldb-commits] [PATCH] D73783: [lldb/DWARF] Re-enable basic dwp support

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 31 06:12:48 PST 2020


labath created this revision.
labath added reviewers: JDevlieghere, aprantl, clayborg.
Herald added subscribers: mgrang, mgorny.
Herald added a project: LLDB.
labath added a parent revision: D73782: [lldb/DWARF] Don't hold a unique SymbolFileDWARFDwo in a DWARFUnit.

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. Righ 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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73783

Files:
  lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
  lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
  lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h
  lldb/test/Shell/SymbolFile/DWARF/dwp.s
  lldb/unittests/Expression/DWARFExpressionTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73783.241712.patch
Type: text/x-patch
Size: 34081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200131/c2258ff5/attachment-0001.bin>


More information about the lldb-commits mailing list