From 5e95aa85bb660d45e9905ef1d7180b2678280660 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 3 Jul 2015 16:57:06 +0000 Subject: Import LLDB as of upstream SVN 241361 (git 612c075f) --- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h | 53 ++++++++++++++--------- 1 file changed, 32 insertions(+), 21 deletions(-) (limited to 'source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h') diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h index d8efdbcb38a4c..2f0b3f05b153e 100644 --- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h +++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h @@ -103,6 +103,7 @@ public: virtual size_t ParseCompileUnitFunctions (const lldb_private::SymbolContext& sc); virtual bool ParseCompileUnitLineTable (const lldb_private::SymbolContext& sc); virtual bool ParseCompileUnitSupportFiles (const lldb_private::SymbolContext& sc, lldb_private::FileSpecList& support_files); + virtual bool ParseImportedModules (const lldb_private::SymbolContext &sc, std::vector &imported_modules); virtual size_t ParseFunctionBlocks (const lldb_private::SymbolContext& sc); virtual size_t ParseTypes (const lldb_private::SymbolContext& sc); virtual size_t ParseVariablesForContext (const lldb_private::SymbolContext& sc); @@ -151,22 +152,15 @@ public: clang::DeclarationName Name, llvm::SmallVectorImpl *results); - static bool - LayoutRecordType (void *baton, - const clang::RecordDecl *record_decl, - uint64_t &size, - uint64_t &alignment, - llvm::DenseMap &field_offsets, - llvm::DenseMap &base_offsets, - llvm::DenseMap &vbase_offsets); - - bool - LayoutRecordType (const clang::RecordDecl *record_decl, - uint64_t &size, - uint64_t &alignment, - llvm::DenseMap &field_offsets, - llvm::DenseMap &base_offsets, - llvm::DenseMap &vbase_offsets); + static bool LayoutRecordType(void *baton, const clang::RecordDecl *record_decl, uint64_t &size, uint64_t &alignment, + llvm::DenseMap &field_offsets, + llvm::DenseMap &base_offsets, + llvm::DenseMap &vbase_offsets); + + bool LayoutRecordType(const clang::RecordDecl *record_decl, uint64_t &size, uint64_t &alignment, + llvm::DenseMap &field_offsets, + llvm::DenseMap &base_offsets, + llvm::DenseMap &vbase_offsets); struct LayoutInfo { @@ -180,9 +174,9 @@ public: } uint64_t bit_size; uint64_t alignment; - llvm::DenseMap field_offsets; - llvm::DenseMap base_offsets; - llvm::DenseMap vbase_offsets; + llvm::DenseMap field_offsets; + llvm::DenseMap base_offsets; + llvm::DenseMap vbase_offsets; }; //------------------------------------------------------------------ // PluginInterface protocol @@ -366,7 +360,6 @@ protected: bool skip_artificial, bool &is_static, bool &is_variadic, - lldb_private::TypeList* type_list, std::vector& function_args, std::vector& function_param_decls, unsigned &type_quals); @@ -393,10 +386,12 @@ protected: // Given a die_offset, figure out the symbol context representing that die. bool ResolveFunction (dw_offset_t offset, DWARFCompileUnit *&dwarf_cu, + bool include_inlines, lldb_private::SymbolContextList& sc_list); bool ResolveFunction (DWARFCompileUnit *cu, const DWARFDebugInfoEntry *die, + bool include_inlines, lldb_private::SymbolContextList& sc_list); bool FunctionDieMatchesPartialName ( @@ -410,16 +405,19 @@ protected: void FindFunctions( const lldb_private::ConstString &name, const NameToDIE &name_to_die, + bool include_inlines, lldb_private::SymbolContextList& sc_list); void FindFunctions ( const lldb_private::RegularExpression ®ex, const NameToDIE &name_to_die, + bool include_inlines, lldb_private::SymbolContextList& sc_list); void FindFunctions ( const lldb_private::RegularExpression ®ex, const DWARFMappedHash::MemoryTable &memory_table, + bool include_inlines, lldb_private::SymbolContextList& sc_list); lldb::TypeSP FindDefinitionTypeForDWARFDeclContext ( @@ -438,6 +436,7 @@ protected: lldb_private::Symbol * GetObjCClassSymbol (const lldb_private::ConstString &objc_class_name); void ParseFunctions (const DIEArray &die_offsets, + bool include_inlines, lldb_private::SymbolContextList& sc_list); lldb::TypeSP GetTypeForDIE (DWARFCompileUnit *cu, const DWARFDebugInfoEntry* die); @@ -549,6 +548,13 @@ protected: FixupAddress (lldb_private::Address &addr); typedef std::set TypeSet; + + typedef struct { + lldb_private::ConstString m_name; + lldb::ModuleSP m_module_sp; + } ClangModuleInfo; + + typedef std::map ExternalTypeModuleMap; void GetTypes (DWARFCompileUnit* dwarf_cu, @@ -562,6 +568,9 @@ protected: GlobalVariableMap & GetGlobalAranges(); + + void + UpdateExternalModuleListIfNeeded(); lldb::ModuleWP m_debug_map_module_wp; SymbolFileDWARFDebugMap * m_debug_map_symfile; @@ -591,6 +600,7 @@ protected: std::unique_ptr m_apple_namespaces_ap; std::unique_ptr m_apple_objc_ap; std::unique_ptr m_global_aranges_ap; + ExternalTypeModuleMap m_external_type_modules; NameToDIE m_function_basename_index; // All concrete functions NameToDIE m_function_fullname_index; // All concrete functions NameToDIE m_function_method_index; // All inlined functions @@ -601,7 +611,8 @@ protected: NameToDIE m_namespace_index; // All type DIE offsets bool m_indexed:1, m_is_external_ast_source:1, - m_using_apple_tables:1; + m_using_apple_tables:1, + m_fetched_external_modules:1; lldb_private::LazyBool m_supports_DW_AT_APPLE_objc_complete_type; std::unique_ptr m_ranges; -- cgit v1.3