9#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H
15#include "llvm/ADT/DenseMap.h"
16#include "llvm/DebugInfo/CodeView/CVRecord.h"
17#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
18#include "llvm/DebugInfo/PDB/PDBTypes.h"
52 bool isA(
const void *ClassID)
const override {
102 std::vector<lldb_private::SourceModule> &imported_modules)
override;
108 uint32_t max_matches,
125 lldb::SymbolContextItem resolve_scope,
128 lldb::SymbolContextItem resolve_scope,
146 llvm::Expected<lldb::TypeSystemSP>
151 bool only_root_namespaces)
override;
162 std::optional<llvm::codeview::TypeIndex>
195 const llvm::codeview::ModifierRecord &mr,
198 const llvm::codeview::PointerRecord &pr,
202 const llvm::codeview::ClassRecord &cr,
205 const llvm::codeview::EnumRecord &er,
208 const llvm::codeview::UnionRecord &ur,
211 const llvm::codeview::ArrayRecord &ar,
214 const llvm::codeview::MemberFunctionRecord &pr,
217 const llvm::codeview::ProcedureRecord &pr,
220 const llvm::codeview::TagRecord &record,
246 const llvm::codeview::CVSymbol &cvs);
274 llvm::DenseMap<lldb::user_id_t, lldb::BlockSP>
m_blocks;
277 llvm::DenseMap<lldb::user_id_t, lldb::TypeSP>
m_types;
279 llvm::DenseMap<llvm::codeview::TypeIndex, llvm::codeview::TypeIndex>
A section + offset based address class.
A class that describes a single lexical block.
A class that describes a compilation unit.
Represents a generic declaration context in a program.
Represents a generic declaration such as a function declaration.
Generic representation of a type in a programming language.
A uniqued constant string class.
A class to manage flag bits.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class that describes a function.
A class that encapsulates name lookup information.
"lldb/Core/SourceLocationSpec.h" A source location specifier class.
A stream class that can stream formatted output to a file.
A list of support files for a CompileUnit.
Defines a list of symbol context objects.
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and c...
Defines a symbol context baton that can be handed other debug core functions.
Containing protected virtual methods for child classes to override.
bool isA(const void *ClassID) const override
LLVM RTTI support.
Provides public interface for all SymbolFiles.
virtual bool isA(const void *ClassID) const
LLVM RTTI support.
A class that contains all state required for type lookups.
This class tracks the state and results of a TypeQuery.
PdbIndex - Lazy access to the important parts of a PDB file.
lldb::VariableSP GetOrCreateGlobalVariable(PdbGlobalSymId var_id)
bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override
llvm::pdb::PDBFile & GetPDBFile()
lldb::TypeSP CreateArrayType(PdbTypeSymId type_id, const llvm::codeview::ArrayRecord &ar, CompilerType ct)
std::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.
lldb::VariableSP CreateGlobalVariable(PdbGlobalSymId var_id)
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
void InitializeObject() override
Initialize the SymbolFile object.
static SymbolFile * CreateInstance(lldb::ObjectFileSP objfile_sp)
uint32_t CalculateNumCompileUnits() override
llvm::DenseMap< lldb::user_id_t, lldb::TypeSP > m_types
bool CompleteType(CompilerType &compiler_type) override
lldb::LanguageType ParseLanguage(lldb_private::CompileUnit &comp_unit) override
CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override
lldb::VariableSP GetOrCreateLocalVariable(PdbCompilandSymId scope_id, PdbCompilandSymId var_id, bool is_param)
size_t ParseVariablesForContext(const SymbolContext &sc) override
size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override
lldb::TypeSP CreatePointerType(PdbTypeSymId type_id, const llvm::codeview::PointerRecord &pr, CompilerType ct)
lldb::FunctionSP CreateFunction(PdbCompilandSymId func_id, CompileUnit &comp_unit)
llvm::DenseMap< lldb::user_id_t, lldb::BlockSP > m_blocks
bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, SupportFileList &support_files) override
CompilerDecl GetDeclForUID(lldb::user_id_t uid) override
bool isA(const void *ClassID) const override
LLVM RTTI support.
lldb::TypeSP GetOrCreateTypedef(PdbGlobalSymId id)
void FindTypesByName(llvm::StringRef name, uint32_t max_matches, TypeMap &types)
lldb::TypeSP CreateTagType(PdbTypeSymId type_id, const llvm::codeview::ClassRecord &cr, CompilerType ct)
lldb::TypeSP GetOrCreateType(PdbTypeSymId type_id)
llvm::BumpPtrAllocator m_allocator
void DumpClangAST(Stream &s) override
lldb::TypeSP CreateTagType(PdbTypeSymId type_id, const llvm::codeview::UnionRecord &ur, CompilerType ct)
void GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask, TypeList &type_list) override
llvm::DenseMap< lldb::user_id_t, lldb::VariableSP > m_local_variables
~SymbolFileNativePDB() override
lldb::VariableSP CreateConstantSymbol(PdbGlobalSymId var_id, const llvm::codeview::CVSymbol &cvs)
lldb::TypeSP CreateType(PdbTypeSymId type_id, CompilerType ct)
void AddSymbols(Symtab &symtab) override
std::optional< llvm::codeview::TypeIndex > GetParentType(llvm::codeview::TypeIndex ti)
void FindFunctions(const Module::LookupInfo &lookup_info, const CompilerDeclContext &parent_decl_ctx, bool include_inlines, SymbolContextList &sc_list) override
static llvm::StringRef GetPluginDescriptionStatic()
std::unique_ptr< llvm::pdb::PDBFile > m_file_up
lldb::VariableSP CreateLocalVariable(PdbCompilandSymId scope_id, PdbCompilandSymId var_id, bool is_param)
lldb::TypeSP CreateProcedureType(PdbTypeSymId type_id, const llvm::codeview::ProcedureRecord &pr, CompilerType ct)
lldb::TypeSP CreateModifierType(PdbTypeSymId type_id, const llvm::codeview::ModifierRecord &mr, CompilerType ct)
uint64_t GetDebugInfoSize(bool load_all_debug_info=false) override
Metrics gathering functions.
size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override
Block * GetOrCreateBlock(PdbCompilandSymId block_id)
lldb::addr_t m_obj_load_address
size_t ParseBlocksRecursive(Function &func) override
lldb::CompUnitSP CreateCompileUnit(const CompilandIndexItem &cci)
std::optional< PdbCompilandSymId > FindSymbolScope(PdbCompilandSymId id)
size_t ParseSymbolArrayInScope(PdbCompilandSymId parent, llvm::function_ref< bool(llvm::codeview::SymbolKind, PdbCompilandSymId)> fn)
const llvm::pdb::PDBFile & GetPDBFile() const
size_t ParseVariablesForCompileUnit(CompileUnit &comp_unit, VariableList &variables)
uint32_t CalculateAbilities() override
llvm::DenseMap< lldb::user_id_t, lldb::CompUnitSP > m_compilands
Block * CreateBlock(PdbCompilandSymId block_id)
llvm::Expected< uint32_t > GetFileIndex(const CompilandIndexItem &cii, uint32_t file_id)
lldb::CompUnitSP GetOrCreateCompileUnit(const CompilandIndexItem &cci)
Type * ResolveTypeUID(lldb::user_id_t type_uid) override
llvm::DenseMap< lldb::user_id_t, lldb::FunctionSP > m_functions
bool ParseImportedModules(const SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
static void DebuggerInitialize(Debugger &debugger)
llvm::DenseMap< lldb::user_id_t, std::shared_ptr< InlineSite > > m_inline_sites
lldb::user_id_t anonymous_id
void ParseInlineSite(PdbCompilandSymId inline_site_id, Address func_addr)
lldb::TypeSP CreateTagType(PdbTypeSymId type_id, const llvm::codeview::EnumRecord &er, CompilerType ct)
lldb::TypeSP CreateClassStructUnion(PdbTypeSymId type_id, const llvm::codeview::TagRecord &record, size_t size, CompilerType ct)
void FindGlobalVariables(ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, VariableList &variables) override
static llvm::StringRef GetPluginNameStatic()
size_t ParseVariablesForBlock(PdbCompilandSymId block_id)
void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override
lldb::FunctionSP GetOrCreateFunction(PdbCompilandSymId func_id, CompileUnit &comp_unit)
llvm::DenseMap< llvm::codeview::TypeIndex, llvm::codeview::TypeIndex > m_parent_types
lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override
lldb::TypeSP CreateFunctionType(PdbTypeSymId type_id, const llvm::codeview::MemberFunctionRecord &pr, CompilerType ct)
lldb::TypeSP CreateAndCacheType(PdbTypeSymId type_id)
CompilerDeclContext FindNamespace(ConstString name, const CompilerDeclContext &parent_decl_ctx, bool only_root_namespaces) override
Finds a namespace of name name and whose parent context is parent_decl_ctx.
CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
lldb::TypeSP CreateTypedef(PdbGlobalSymId id)
bool m_done_full_type_scan
void FindTypes(const lldb_private::TypeQuery &match, lldb_private::TypeResults &results) override
Find types using a type-matching object that contains all search parameters.
static char ID
LLVM RTTI support.
lldb::TypeSP GetOrCreateType(llvm::codeview::TypeIndex ti)
static bool classof(const SymbolFile *obj)
uint32_t ResolveSymbolContext(const Address &so_addr, lldb::SymbolContextItem resolve_scope, SymbolContext &sc) override
llvm::StringRef GetPluginName() override
std::unique_ptr< PdbIndex > m_index
llvm::DenseMap< lldb::user_id_t, lldb::VariableSP > m_global_vars
lldb::TypeSP CreateSimpleType(llvm::codeview::TypeIndex ti, CompilerType ct)
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Function > FunctionSP
std::shared_ptr< lldb_private::ObjectFile > ObjectFileSP
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Type > TypeSP
std::shared_ptr< lldb_private::Variable > VariableSP
std::shared_ptr< lldb_private::CompileUnit > CompUnitSP
lldb::addr_t file_addr
The file address for this line entry.
Represents a single compile unit.
RangeSourceLineVector ranges
std::vector< lldb_private::LineTable::Entry > line_entries
PdbCompilandSymId parent_id
InlineSite(PdbCompilandSymId parent_id)
std::shared_ptr< InlineFunctionInfo > inline_function_info
bool operator()(const lldb_private::LineTable::Entry &lhs, const lldb_private::LineTable::Entry &rhs) const