15#include "llvm/Support/Casting.h"
32 m_base_symbol_file(base_symbol_file) {
42 if (
const llvm::DWARFUnitIndex::Entry *entry = index.getFromHash(hash)) {
43 if (
auto *unit_contrib = entry->getContribution())
44 return llvm::dyn_cast_or_null<DWARFCompileUnit>(
46 unit_contrib->getOffset()));
54 std::optional<uint64_t> dwo_id = cu->
GetDWOId();
55 if (!dwo_id || hash != *dwo_id)
71 for (
size_t i = 0; i < debug_info.
GetNumUnits(); ++i) {
84 const uint8_t op)
const {
101 lldb::offset_t &offset, std::vector<lldb_private::Value> &stack)
const {
113llvm::DenseMap<lldb::opaque_compiler_type_t, DIERef> &
120 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
134 bool must_be_implementation) {
136 die, type_name, must_be_implementation);
139llvm::Expected<lldb::TypeSystemSP>
Represents a generic declaration context in a program.
A uniqued constant string class.
uint64_t GetDebugInfoSize() const
Get the debug information size from all sections that contain debug information.
bool GetDebugInfoHadFrameVariableErrors() const override
Accessors for the bool that indicates if there was debug info, but errors stopped variables from bein...
void SetDebugInfoIndexWasLoadedFromCache() override
bool GetDebugInfoIndexWasSavedToCache() const override
lldb::ObjectFileSP m_objfile_sp
void SetDebugInfoIndexWasSavedToCache() override
void SetDebugInfoHadFrameVariableErrors() override
bool GetDebugInfoIndexWasLoadedFromCache() const override
Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module...
Identifies a DWARF debug info entry within a given Module.
std::optional< uint32_t > file_index() const
dw_offset_t die_offset() const
llvm::DWARFContext & GetAsLLVM()
DWARFDIE GetDIE(DIERef::Section section, dw_offset_t die_offset)
DWARFUnit * GetUnitAtIndex(size_t idx)
std::optional< uint64_t > GetDWOId()
Get the DWO ID from the DWARFUnitHeader for DWARF5, or from the unit DIE's DW_AT_dwo_id or DW_AT_GNU_...
SymbolFileDWARFDwo(SymbolFileDWARF &m_base_symbol_file, lldb::ObjectFileSP objfile, uint32_t id)
llvm::DenseMap< lldb::opaque_compiler_type_t, DIERef > & GetForwardDeclCompilerTypeToDIE() override
bool GetDebugInfoIndexWasSavedToCache() const override
bool GetDebugInfoIndexWasLoadedFromCache() const override
Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module...
void SetDebugInfoIndexWasLoadedFromCache() override
UniqueDWARFASTTypeMap & GetUniqueDWARFASTTypeMap() override
uint64_t GetDebugInfoSize(bool load_all_debug_info=false) override
Metrics gathering functions.
void SetDebugInfoIndexWasSavedToCache() override
DWARFCompileUnit * FindSingleCompileUnit()
If this file contains exactly one compile unit, this function will return it.
DWARFDIE FindDefinitionDIE(const DWARFDIE &die) override
DIEToTypePtr & GetDIEToType() override
DIEToVariableSP & GetDIEToVariable() override
lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(const DWARFDIE &die, ConstString type_name, bool must_be_implementation) override
SymbolFileDWARF & GetBaseSymbolFile() const
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
void FindGlobalVariables(ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, VariableList &variables) override
void SetDebugInfoHadFrameVariableErrors() override
SymbolFileDWARF * GetDIERefSymbolFile(const DIERef &die_ref) override
Given a DIERef, find the correct SymbolFileDWARF.
bool GetDebugInfoHadFrameVariableErrors() const override
Accessors for the bool that indicates if there was debug info, but errors stopped variables from bein...
DWARFDIE GetDIE(const DIERef &die_ref) override
DWARFCompileUnit * GetDWOCompileUnitForHash(uint64_t hash)
void GetObjCMethods(ConstString class_name, llvm::function_ref< bool(DWARFDIE die)> callback) override
static char ID
LLVM RTTI support.
bool ParseVendorDWARFOpcode(uint8_t op, const DataExtractor &opcodes, lldb::offset_t &offset, std::vector< Value > &stack) const override
lldb::offset_t GetVendorDWARFOpcodeSize(const DataExtractor &data, const lldb::offset_t data_offset, const uint8_t op) const override
void FindGlobalVariables(ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, VariableList &variables) override
virtual DWARFDIE FindDefinitionDIE(const DWARFDIE &die)
llvm::DenseMap< const DWARFDebugInfoEntry *, Type * > DIEToTypePtr
virtual llvm::DenseMap< lldb::opaque_compiler_type_t, DIERef > & GetForwardDeclCompilerTypeToDIE()
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::VariableSP > DIEToVariableSP
virtual lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(const DWARFDIE &die, ConstString type_name, bool must_be_implementation)
virtual bool ParseVendorDWARFOpcode(uint8_t op, const DataExtractor &opcodes, lldb::offset_t &offset, std::vector< Value > &stack) const
virtual void GetObjCMethods(ConstString class_name, llvm::function_ref< bool(DWARFDIE die)> callback)
virtual DWARFDIE GetDIE(const DIERef &die_ref)
virtual lldb::offset_t GetVendorDWARFOpcodeSize(const DataExtractor &data, const lldb::offset_t data_offset, const uint8_t op) const
virtual DIEToTypePtr & GetDIEToType()
DWARFDebugInfo & DebugInfo()
void SetFileIndex(std::optional< uint64_t > file_index)
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
virtual SymbolFileDWARF * GetDIERefSymbolFile(const DIERef &die_ref)
Given a DIERef, find the correct SymbolFileDWARF.
virtual DIEToVariableSP & GetDIEToVariable()
std::optional< uint64_t > GetFileIndex() const
virtual UniqueDWARFASTTypeMap & GetUniqueDWARFASTTypeMap()
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ObjectFile > ObjectFileSP
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Type > TypeSP