diff options
Diffstat (limited to 'include/lldb/Symbol/SymbolVendor.h')
-rw-r--r-- | include/lldb/Symbol/SymbolVendor.h | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/include/lldb/Symbol/SymbolVendor.h b/include/lldb/Symbol/SymbolVendor.h index d48f646d52cd5..c4015ff034927 100644 --- a/include/lldb/Symbol/SymbolVendor.h +++ b/include/lldb/Symbol/SymbolVendor.h @@ -1,9 +1,8 @@ //===-- SymbolVendor.h ------------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -14,6 +13,7 @@ #include "lldb/Core/ModuleChild.h" #include "lldb/Core/PluginInterface.h" +#include "lldb/Symbol/SourceModule.h" #include "lldb/Symbol/TypeList.h" #include "lldb/Symbol/TypeMap.h" #include "lldb/lldb-private.h" @@ -21,7 +21,6 @@ namespace lldb_private { -//---------------------------------------------------------------------- // The symbol vendor class is designed to abstract the process of searching for // debug information for a given module. Platforms can subclass this class and // provide extra ways to find debug information. Examples would be a subclass @@ -29,15 +28,12 @@ namespace lldb_private { // or runtime data in the object files. A symbol vendor can use multiple // sources (SymbolFile objects) to provide the information and only parse as // deep as needed in order to provide the information that is requested. -//---------------------------------------------------------------------- class SymbolVendor : public ModuleChild, public PluginInterface { public: static SymbolVendor *FindPlugin(const lldb::ModuleSP &module_sp, Stream *feedback_strm); - //------------------------------------------------------------------ // Constructors and Destructors - //------------------------------------------------------------------ SymbolVendor(const lldb::ModuleSP &module_sp); ~SymbolVendor() override; @@ -61,8 +57,9 @@ public: virtual size_t ParseTypes(CompileUnit &comp_unit); - virtual bool ParseImportedModules(const SymbolContext &sc, - std::vector<ConstString> &imported_modules); + virtual bool + ParseImportedModules(const SymbolContext &sc, + std::vector<SourceModule> &imported_modules); virtual size_t ParseBlocksRecursive(Function &func); @@ -79,7 +76,7 @@ public: lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list); - virtual size_t FindGlobalVariables(const ConstString &name, + virtual size_t FindGlobalVariables(ConstString name, const CompilerDeclContext *parent_decl_ctx, size_t max_matches, VariableList &variables); @@ -88,7 +85,7 @@ public: size_t max_matches, VariableList &variables); - virtual size_t FindFunctions(const ConstString &name, + virtual size_t FindFunctions(ConstString name, const CompilerDeclContext *parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, bool append, @@ -99,7 +96,7 @@ public: SymbolContextList &sc_list); virtual size_t - FindTypes(const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx, bool append, size_t max_matches, llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files, TypeMap &types); @@ -108,7 +105,7 @@ public: bool append, TypeMap &types); virtual CompilerDeclContext - FindNamespace(const ConstString &name, + FindNamespace(ConstString name, const CompilerDeclContext *parent_decl_ctx); virtual size_t GetNumCompileUnits(); @@ -125,7 +122,7 @@ public: virtual size_t GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask, TypeList &type_list); - SymbolFile *GetSymbolFile() { return m_sym_file_ap.get(); } + SymbolFile *GetSymbolFile() { return m_sym_file_up.get(); } FileSpec GetMainFileSpec() const; @@ -135,23 +132,17 @@ public: // Clear module unified section list symbol table. virtual void ClearSymtab(); - //------------------------------------------------------------------ /// Notify the SymbolVendor that the file addresses in the Sections /// for this module have been changed. - //------------------------------------------------------------------ virtual void SectionFileAddressesChanged(); - //------------------------------------------------------------------ // PluginInterface protocol - //------------------------------------------------------------------ ConstString GetPluginName() override; uint32_t GetPluginVersion() override; protected: - //------------------------------------------------------------------ // Classes that inherit from SymbolVendor can see and modify these - //------------------------------------------------------------------ typedef std::vector<lldb::CompUnitSP> CompileUnits; typedef CompileUnits::iterator CompileUnitIter; typedef CompileUnits::const_iterator CompileUnitConstIter; @@ -162,15 +153,13 @@ protected: // case it isn't the same as the module // object file (debug symbols in a separate // file) - std::unique_ptr<SymbolFile> m_sym_file_ap; // A single symbol file. Subclasses + std::unique_ptr<SymbolFile> m_sym_file_up; // A single symbol file. Subclasses // can add more of these if needed. Symtab *m_symtab; // Save a symtab once to not pass it through `AddSymbols` of // the symbol file each time when it is needed private: - //------------------------------------------------------------------ // For SymbolVendor only - //------------------------------------------------------------------ DISALLOW_COPY_AND_ASSIGN(SymbolVendor); }; |