9 #ifndef SymbolFileDWARF_SymbolFileDWARF_h_ 10 #define SymbolFileDWARF_SymbolFileDWARF_h_ 16 #include <unordered_map> 19 #include "llvm/ADT/DenseMap.h" 20 #include "llvm/Support/Threading.h" 56 #define DIE_IS_BEING_PARSED ((lldb_private::Type *)1) 111 lldb_private::FileSpecList &support_files)
override;
119 std::vector<lldb_private::SourceModule> &imported_modules)
override;
134 bool assert_not_being_parsed =
true,
135 bool resolve_function_context =
false);
154 lldb::SymbolContextItem resolve_scope,
160 lldb::SymbolContextItem resolve_scope,
176 lldb::FunctionNameType name_type_mask,
bool include_inlines,
180 bool include_inlines,
bool append,
184 const std::string &scope_qualified_name,
185 std::vector<lldb_private::ConstString> &mangled_names)
override;
191 llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
194 size_t FindTypes(
const std::vector<lldb_private::CompilerContext> &context,
200 lldb::TypeClass type_mask,
282 typedef std::map<lldb_private::ConstString, lldb::ModuleSP>
292 virtual std::unique_ptr<SymbolFileDWARFDwo>
305 std::vector<lldb_private::CallEdge>
313 typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb_private::Type *>
315 typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::VariableSP>
355 bool parse_siblings,
bool parse_children);
358 const DWARFDIE &die,
bool *type_is_new);
361 bool assert_not_being_parsed);
386 bool must_be_implementation);
392 bool resolve_function_context =
false);
417 typedef std::set<lldb_private::Type *>
TypeSet;
476 std::unique_ptr<DWARFDebugAbbrev>
m_abbr;
481 typedef std::unordered_map<lldb::offset_t, lldb_private::DebugMacrosSP>
486 std::unique_ptr<lldb_private::DWARFIndex>
m_index;
501 #endif // SymbolFileDWARF_SymbolFileDWARF_h_ std::shared_ptr< std::set< DIERef > > DIERefSetSP
DWARFDIE GetDeclContextDIEContainingDIE(const DWARFDIE &die)
bool ResolveFunction(const DWARFDIE &die, bool include_inlines, lldb_private::SymbolContextList &sc_list)
virtual const lldb_private::DWARFDataExtractor & get_debug_addr_data()
A class to manage flag bits.
virtual const lldb_private::DWARFDataExtractor & get_debug_str_offsets_data()
static void DebuggerInitialize(lldb_private::Debugger &debugger)
const ExternalTypeModuleMap & getExternalTypeModules() const
Return the list of Clang modules imported by this SymbolFile.
uint32_t GetPluginVersion() override
size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override
uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
virtual DIEToClangType & GetForwardDeclDieToClangType()
Defines a list of symbol context objects.
A stream class that can stream formatted output to a file.
virtual lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(const DWARFDIE &die, lldb_private::ConstString type_name, bool must_be_implementation)
virtual lldb::CompUnitSP ParseCompileUnit(DWARFUnit *dwarf_cu, uint32_t cu_idx)
Defines a symbol context baton that can be handed other debug core functions.
std::recursive_mutex & GetModuleMutex() const override
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this ...
DWARFDataSegment m_data_debug_line_str
static lldb_private::ConstString GetPluginNameStatic()
virtual void LoadSectionData(lldb::SectionType sect_type, lldb_private::DWARFDataExtractor &data)
const lldb_private::DWARFDataExtractor & get_debug_line_data()
std::unique_ptr< lldb_private::DWARFIndex > m_index
DWARFDataSegment m_data_debug_ranges
bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override
lldb_private::Function * ParseFunction(lldb_private::CompileUnit &comp_unit, const DWARFDIE &die)
const lldb_private::DWARFDataExtractor & get_apple_namespaces_data()
std::vector< lldb_private::CallEdge > ParseCallEdgesInFunction(UserID func_id) override
void * opaque_compiler_type_t
const lldb_private::DWARFDataExtractor & get_debug_frame_data()
A mix in class that contains a generic user ID.
DWARFDIE GetDIEFromUID(lldb::user_id_t uid)
~SymbolFileDWARF() override
"lldb/Utility/RegularExpression.h" A C++ wrapper class for regex.
lldb_private::RangeDataVector< lldb::addr_t, lldb::addr_t, lldb_private::Variable * > GlobalVariableMap
uint32_t GetNumCompileUnits() override
uint32_t FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override
void Dump(lldb_private::Stream &s) override
A class that describes a function.
static const char * GetPluginDescriptionStatic()
void InitializeObject() override
Initialize the SymbolFile object.
DWARFDataSegment m_data_gnu_debugaltlink
A plug-in interface definition class for object file parsers.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
lldb_private::CompilerDeclContext FindNamespace(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx) override
llvm::once_flag m_dwp_symfile_once_flag
void GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector< lldb_private::ConstString > &mangled_names) override
static bool SupportedVersion(uint16_t version)
lldb_private::Symbol * GetObjCClassSymbol(lldb_private::ConstString objc_class_name)
lldb_private::TypeSystem * GetTypeSystemForLanguage(lldb::LanguageType language) override
DWARFDebugRangesBase * DebugRanges()
lldb::LanguageType ParseLanguage(lldb_private::CompileUnit &comp_unit) override
bool ClassContainsSelector(const DWARFDIE &class_die, lldb_private::ConstString selector)
A class that describes a single lexical block.
size_t GetTypes(lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override
lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override
static DWARFDIE GetParentSymbolContextDIE(const DWARFDIE &die)
virtual std::unique_ptr< SymbolFileDWARFDwo > GetDwoSymbolFileForCompileUnit(DWARFUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die)
DIEToTypePtr m_die_to_type
bool HasForwardDeclForClangType(const lldb_private::CompilerType &compiler_type)
A class that describes a compilation unit.
DebugMacrosMap m_debug_macros_map
DWARFDataSegment m_data_debug_abbrev
UserID(lldb::user_id_t uid=LLDB_INVALID_UID)
Construct with optional user ID.
bool m_fetched_external_modules
std::vector< DIERef > DIEArray
const lldb_private::DWARFDataExtractor & get_apple_names_data()
DWARFDataSegment m_data_debug_info
llvm::Optional< ArrayInfo > GetDynamicArrayInfoForUID(lldb::user_id_t type_uid, const lldb_private::ExecutionContext *exe_ctx) override
If type_uid points to an array type, return its characteristics.
DWARFDataSegment m_data_debug_addr
lldb_private::ConstString GetPluginName() override
SymbolFileDWARFDebugMap * GetDebugMapSymfile()
lldb_private::CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override
DWARFDataSegment m_data_debug_frame
std::unique_ptr< DWARFDebugInfo > m_info
DWARFDataSegment m_data_debug_line
SymbolFileDWARFDwp * GetDwpSymbolFile()
DWARFDataSegment m_data_debug_str_offsets
std::unique_ptr< DWARFDebugLine > m_line
DWARFDataSegment m_data_debug_str
bool DIEDeclContextsMatch(const DWARFDIE &die1, const DWARFDIE &die2)
llvm::DenseMap< lldb::opaque_compiler_type_t, DIERef > ClangTypeToDIE
virtual DIEToVariableSP & GetDIEToVariable()
LanguageType
Programming language type.
std::unordered_map< std::string, DIERefSetSP > NameToOffsetMap
size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override
lldb_private::Type * ResolveTypeUID(lldb::user_id_t type_uid) override
void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override
lldb_private::Type * ResolveType(const DWARFDIE &die, bool assert_not_being_parsed=true, bool resolve_function_context=false)
lldb::TypeSP ParseType(const lldb_private::SymbolContext &sc, const DWARFDIE &die, bool *type_is_new)
uint32_t FindTypes(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet< lldb_private::SymbolFile *> &searched_symbol_files, lldb_private::TypeMap &types) override
const lldb_private::DWARFDataExtractor & get_debug_rnglists_data()
const lldb_private::DWARFDataExtractor & get_apple_objc_data()
bool DeclContextMatchesThisSymbolFile(const lldb_private::CompilerDeclContext *decl_ctx)
size_t ParseVariables(const lldb_private::SymbolContext &sc, const DWARFDIE &orig_die, const lldb::addr_t func_low_pc, bool parse_siblings, bool parse_children, lldb_private::VariableList *cc_variable_list=NULL)
DWARFUnit * GetNextUnparsedDWARFCompileUnit(DWARFUnit *prev_cu)
void PreloadSymbols() override
const lldb_private::DWARFDataExtractor & get_debug_loc_data()
lldb::ModuleWP m_debug_map_module_wp
static lldb_private::SymbolFile * CreateInstance(lldb_private::ObjectFile *obj_file)
std::unique_ptr< DWARFDebugRangesBase > m_ranges
bool FixupAddress(lldb_private::Address &addr)
virtual ClangTypeToDIE & GetForwardDeclClangTypeToDie()
virtual lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDeclContext &die_decl_ctx)
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::opaque_compiler_type_t > DIEToClangType
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
lldb_private::LazyBool m_supports_DW_AT_APPLE_objc_complete_type
virtual const lldb_private::DWARFDataExtractor & get_debug_abbrev_data()
const lldb_private::DWARFDataExtractor & get_gnu_debugaltlink()
bool Supports_DW_AT_APPLE_objc_complete_type(DWARFUnit *cu)
const lldb_private::DWARFDataExtractor & DebugLocData()
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::VariableSP > DIEToVariableSP
ExternalTypeModuleMap m_external_type_modules
virtual lldb_private::DWARFExpression::LocationListFormat GetLocationListFormat() const
SymbolFileDWARFDebugMap * m_debug_map_symfile
std::unique_ptr< SymbolFileDWARFDwp > m_dwp_symfile
virtual DWARFUnit * GetBaseCompileUnit()
std::shared_ptr< DebugMacros > DebugMacrosSP
std::unique_ptr< GlobalVariableMap > m_global_aranges_up
A section + offset based address class.
DWARFDebugInfo * DebugInfo()
DWARFDataSegment m_data_debug_loc
lldb_private::TypeList * GetTypeList() override
const lldb_private::DWARFDataExtractor & get_apple_types_data()
UniqueDWARFASTTypeMap m_unique_ast_type_map
static lldb_private::FileSpecList GetSymlinkPaths()
bool ParseIsOptimized(lldb_private::CompileUnit &comp_unit) override
virtual DIEToTypePtr & GetDIEToType()
SymbolFileDWARF(lldb_private::ObjectFile *ofile)
const lldb_private::DWARFDataExtractor & get_debug_loclists_data()
DIEToVariableSP m_die_to_variable_sp
lldb_private::DWARFContext m_context
std::unordered_map< lldb::offset_t, lldb_private::DebugMacrosSP > DebugMacrosMap
DWARFDataSegment m_data_debug_rnglists
GlobalVariableMap & GetGlobalAranges()
bool CompleteType(lldb_private::CompilerType &compiler_type) override
bool ClassOrStructIsVirtual(const DWARFDIE &die)
lldb::ModuleSP GetDWOModule(lldb_private::ConstString name)
bool GetFunction(const DWARFDIE &die, lldb_private::SymbolContext &sc)
DWARFDebugAbbrev * DebugAbbrev()
void SetDebugMapModule(const lldb::ModuleSP &module_sp)
DWARFDataSegment m_data_apple_types
A uniqued constant string class.
const lldb_private::DWARFDataExtractor & get_debug_line_str_data()
DWARFDataSegment m_data_apple_names
virtual UniqueDWARFASTTypeMap & GetUniqueDWARFASTTypeMap()
const lldb_private::DWARFDataExtractor & get_debug_types_data()
lldb_private::DWARFDataExtractor m_data
DWARFDataSegment m_data_debug_macro
lldb::VariableSP ParseVariableDIE(const lldb_private::SymbolContext &sc, const DWARFDIE &die, const lldb::addr_t func_low_pc)
bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, lldb_private::FileSpecList &support_files) override
static bool DIEInDeclContext(const lldb_private::CompilerDeclContext *parent_decl_ctx, const DWARFDIE &die)
uint32_t CalculateAbilities() override
lldb::TypeSP GetTypeForDIE(const DWARFDIE &die, bool resolve_function_context=false)
DISALLOW_COPY_AND_ASSIGN(SymbolFileDWARF)
const lldb_private::DWARFDataExtractor & get_debug_macro_data()
SymbolFileDWARF * GetDWARFForUID(lldb::user_id_t uid)
bool ParseImportedModules(const lldb_private::SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
virtual DWARFDIE GetDIE(const DIERef &die_ref)
lldb_private::CompilerDecl GetDeclForUID(lldb::user_id_t uid) override
lldb_private::CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override
const lldb_private::DWARFDataExtractor & get_debug_ranges_data()
DWARFDataSegment m_data_apple_namespaces
void UpdateExternalModuleListIfNeeded()
virtual size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name, DIEArray &method_die_offsets)
size_t ParseBlocksRecursive(lldb_private::Function &func) override
DWARFDataSegment m_data_debug_loclists
virtual const lldb_private::DWARFDataExtractor & get_debug_str_data()
void DumpClangAST(lldb_private::Stream &s) override
uint32_t FindFunctions(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, bool append, lldb_private::SymbolContextList &sc_list) override
ClangTypeToDIE m_forward_decl_clang_type_to_die
virtual const lldb_private::DWARFDataExtractor & get_debug_info_data()
virtual DWARFUnit * GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit)
DIEToClangType m_forward_decl_die_to_clang_type
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and c...
DWARFDIE FindBlockContainingSpecification(const DIERef &func_die_ref, dw_offset_t spec_block_die_offset)
const lldb_private::DWARFDataExtractor & GetCachedSectionData(lldb::SectionType sect_type, DWARFDataSegment &data_segment)
size_t ParseVariablesForContext(const lldb_private::SymbolContext &sc) override
DWARFDataSegment m_data_apple_objc
NameToOffsetMap m_function_scope_qualified_name_map
std::map< lldb_private::ConstString, lldb::ModuleSP > ExternalTypeModuleMap
lldb_private::CompileUnit * GetCompUnitForDWARFCompUnit(DWARFUnit *dwarf_cu, uint32_t cu_idx=UINT32_MAX)
std::set< lldb_private::Type * > TypeSet
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb_private::Type * > DIEToTypePtr
std::unique_ptr< DWARFDebugAbbrev > m_abbr
DWARFDataSegment m_data_debug_types