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 {
90 lldb::offset_t &offset, std::vector<lldb_private::Value> &stack)
const {
114 llvm::function_ref<
bool(
DWARFDIE die)> callback) {
129 bool must_be_implementation) {
131 die, type_name, must_be_implementation);
134llvm::Expected<lldb::TypeSystemSP>
Represents a generic declaration context in a program.
A uniqued constant string class.
Identifies a DWARF debug info entry within a given Module.
std::optional< uint32_t > file_index() const
llvm::DWARFContext & GetAsLLVM()
DWARFDIE GetDIE(const DIERef &die_ref)
DWARFUnit * GetUnitAtIndex(size_t idx)
std::optional< uint64_t > GetDWOId()
SymbolFileDWARFDwo(SymbolFileDWARF &m_base_symbol_file, lldb::ObjectFileSP objfile, uint32_t id)
CompilerTypeToDIE & GetForwardDeclCompilerTypeToDIE() override
UniqueDWARFASTTypeMap & GetUniqueDWARFASTTypeMap() override
DWARFCompileUnit * FindSingleCompileUnit()
If this file contains exactly one compile unit, this function will return it.
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
lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die) override
DIEToCompilerType & GetForwardDeclDIEToCompilerType() override
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
llvm::DenseMap< lldb::opaque_compiler_type_t, DIERef > CompilerTypeToDIE
void FindGlobalVariables(ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, VariableList &variables) override
llvm::DenseMap< const DWARFDebugInfoEntry *, Type * > DIEToTypePtr
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()
virtual lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die)
virtual CompilerTypeToDIE & GetForwardDeclCompilerTypeToDIE()
void SetFileIndex(std::optional< uint64_t > file_index)
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
virtual DIEToCompilerType & GetForwardDeclDIEToCompilerType()
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::opaque_compiler_type_t > DIEToCompilerType
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