[Lldb-commits] [PATCH] D73781: [lldb/DWARF] Don't assume that a SymbolFileDWARFDwo contains one compile unit

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


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

This is a preparatory patch to re-enable DWP support in lldb (we already
have code claiming to do that, but it has been completely broken for a
while now).

The idea of the new approach is to make the SymbolFileDWARFDwo class
handle both dwo and dwo files, similar to how llvm uses one DWARFContext
to handle the two.

The first step is to remove the assumption that a SymbolFileDWARFDwo
holds just a single compile unit, i.e. the GetBaseCompileUnit method.
This requires changing the way how we reach the skeleton compile unit
(and the lldb_private::CompileUnit) from a dwo unit, which was
previously done via GetSymbolFile()->GetBaseCompileUnit() (and some
virtual dispatch).

The new approach reuses the "user data" mechanism of DWARFUnits, which
was used to link dwarf units (both skeleton and split) to their
lldb_private counterparts. Now, this is done only for non-dwo units, and
instead of that, the dwo units holds a pointer to the relevant skeleton
unit.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73781

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
  lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73781.241709.patch
Type: text/x-patch
Size: 9637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200131/c440280a/attachment.bin>


More information about the lldb-commits mailing list