Pavel Labath 67f63f3f7c [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
2020-02-17 14:10:36 +01:00

66 lines
1.5 KiB
CMake

lldb_tablegen(SymbolFileDWARFProperties.inc -gen-lldb-property-defs
SOURCE SymbolFileDWARFProperties.td
TARGET LLDBPluginSymbolFileDWARFPropertiesGen)
lldb_tablegen(SymbolFileDWARFPropertiesEnum.inc -gen-lldb-property-enum-defs
SOURCE SymbolFileDWARFProperties.td
TARGET LLDBPluginSymbolFileDWARFPropertiesEnumGen)
add_lldb_library(lldbPluginSymbolFileDWARF PLUGIN
AppleDWARFIndex.cpp
DebugNamesDWARFIndex.cpp
DIERef.cpp
DWARFAbbreviationDeclaration.cpp
DWARFASTParserClang.cpp
DWARFAttribute.cpp
DWARFBaseDIE.cpp
DWARFCompileUnit.cpp
DWARFContext.cpp
DWARFDataExtractor.cpp
DWARFDebugAbbrev.cpp
DWARFDebugAranges.cpp
DWARFDebugArangeSet.cpp
DWARFDebugInfo.cpp
DWARFDebugInfoEntry.cpp
DWARFDebugMacro.cpp
DWARFDebugRanges.cpp
DWARFDeclContext.cpp
DWARFDefines.cpp
DWARFDIE.cpp
DWARFFormValue.cpp
DWARFIndex.cpp
DWARFTypeUnit.cpp
DWARFUnit.cpp
HashedNameToDIE.cpp
LogChannelDWARF.cpp
ManualDWARFIndex.cpp
NameToDIE.cpp
SymbolFileDWARF.cpp
SymbolFileDWARFDwo.cpp
SymbolFileDWARFDebugMap.cpp
UniqueDWARFASTType.cpp
LINK_LIBS
lldbCore
lldbExpression
lldbHost
lldbInterpreter
lldbSymbol
lldbTarget
lldbUtility
lldbPluginObjCLanguage
lldbPluginCPlusPlusLanguage
lldbPluginExpressionParserClang
lldbPluginTypeSystemClang
CLANG_LIBS
clangAST
clangBasic
LINK_COMPONENTS
DebugInfoDWARF
Support
)
add_dependencies(lldbPluginSymbolFileDWARF
LLDBPluginSymbolFileDWARFPropertiesGen
LLDBPluginSymbolFileDWARFPropertiesEnumGen)