Go to the documentation of this file.
9 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVESESSION_H
10 #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVESESSION_H
24 class NativeExeSymbol;
26 class ModuleDebugStreamRef;
28 class PDBSymbolCompiland;
30 template <
typename ChildType>
class IPDBEnumChildren;
33 struct PdbSearchOptions {
40 std::unique_ptr<BumpPtrAllocator> Allocator);
44 std::unique_ptr<IPDBSession> &Session);
46 std::unique_ptr<IPDBSession> &Session);
48 std::unique_ptr<IPDBSession> &Session);
69 std::unique_ptr<IPDBEnumLineNumbers>
72 std::unique_ptr<IPDBEnumLineNumbers>
74 std::unique_ptr<IPDBEnumLineNumbers>
76 std::unique_ptr<IPDBEnumLineNumbers>
80 std::unique_ptr<IPDBEnumSourceFiles>
83 std::unique_ptr<IPDBSourceFile>
87 std::unique_ptr<IPDBEnumChildren<PDBSymbolCompiland>>
90 std::unique_ptr<PDBSymbolCompiland>
96 std::unique_ptr<IPDBSourceFile>
101 std::unique_ptr<IPDBEnumTables>
getEnumTables()
const override;
107 std::unique_ptr<IPDBEnumFrameData>
getFrameData()
const override;
123 void initializeExeSymbol();
124 void parseSectionContribs();
126 std::unique_ptr<PDBFile> Pdb;
127 std::unique_ptr<BumpPtrAllocator>
Allocator;
137 IMap AddrToModuleIndex;
IPDBSession defines an interface used to provide a context for querying debug information from a debu...
This is an optimization pass for GlobalISel generic memory operations.
uint32_t getRVAFromSectOffset(uint32_t Section, uint32_t Offset) const
std::unique_ptr< IPDBEnumTables > getEnumTables() const override
NativeSession(std::unique_ptr< PDBFile > PdbFile, std::unique_ptr< BumpPtrAllocator > Allocator)
IPDBSourceFile defines an interface used to represent source files whose information are stored in th...
std::unique_ptr< IPDBEnumSourceFiles > getSourceFilesForCompiland(const PDBSymbolCompiland &Compiland) const override
uint64_t getVAFromSectOffset(uint32_t Section, uint32_t Offset) const
The instances of the Type class are immutable: once they are created, they are never changed.
std::unique_ptr< IPDBSourceFile > findOneSourceFile(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
static Error createFromExe(StringRef Path, std::unique_ptr< IPDBSession > &Session)
Tagged union holding either a T or a Error.
std::unique_ptr< IPDBEnumFrameData > getFrameData() const override
Expected< ModuleDebugStreamRef > getModuleDebugStream(uint32_t Index) const
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
std::unique_ptr< IPDBEnumLineNumbers > findLineNumbersBySectOffset(uint32_t Section, uint32_t Offset, uint32_t Length) const override
uint64_t getLoadAddress() const override
std::unique_ptr< IPDBEnumInjectedSources > getInjectedSources() const override
bool moduleIndexForVA(uint64_t VA, uint16_t &ModuleIndex) const
std::unique_ptr< IPDBEnumLineNumbers > findLineNumbersByAddress(uint64_t Address, uint32_t Length) const override
const PDBFile & getPDBFile() const
static Error createFromPdbPath(StringRef PdbPath, std::unique_ptr< IPDBSession > &Session)
std::unique_ptr< IPDBSourceFile > getSourceFileById(uint32_t FileId) const override
PDB_NameSearchFlags
Defines flags used for enumerating child symbols.
std::unique_ptr< IPDBEnumSourceFiles > findSourceFiles(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
typename Sizer::Allocator Allocator
std::unique_ptr< IPDBEnumSectionContribs > getSectionContribs() const override
static Error createFromPdb(std::unique_ptr< MemoryBuffer > MB, std::unique_ptr< IPDBSession > &Session)
bool setLoadAddress(uint64_t Address) override
std::unique_ptr< IPDBEnumLineNumbers > findLineNumbersByRVA(uint32_t RVA, uint32_t Length) const override
std::unique_ptr< PDBSymbol > findSymbolByRVA(uint32_t RVA, PDB_SymType Type) override
bool addressForVA(uint64_t VA, uint32_t &Section, uint32_t &Offset) const override
SymbolCache & getSymbolCache()
bool addressForRVA(uint32_t RVA, uint32_t &Section, uint32_t &Offset) const override
std::unique_ptr< PDBSymbolExe > getGlobalScope() override
std::unique_ptr< PDBSymbol > findSymbolBySectOffset(uint32_t Sect, uint32_t Offset, PDB_SymType Type) override
const SymbolCache & getSymbolCache() const
std::unique_ptr< PDBSymbol > getSymbolById(SymIndexId SymbolId) const override
StringRef - Represent a constant reference to a string, i.e.
std::unique_ptr< PDBSymbol > findSymbolByAddress(uint64_t Address, PDB_SymType Type) override
~NativeSession() override
Lightweight error class with error context and mandatory checking.
static Expected< std::string > searchForPdb(const PdbSearchOptions &Opts)
std::unique_ptr< IPDBEnumChildren< PDBSymbolCompiland > > findCompilandsForSourceFile(llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
std::unique_ptr< IPDBEnumLineNumbers > findLineNumbers(const PDBSymbolCompiland &Compiland, const IPDBSourceFile &File) const override
NativeExeSymbol & getNativeGlobalScope() const
std::unique_ptr< IPDBEnumSourceFiles > getAllSourceFiles() const override
std::unique_ptr< IPDBEnumDataStreams > getDebugStreams() const override
std::unique_ptr< PDBSymbolCompiland > findOneCompilandForSourceFile(llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
bool moduleIndexForSectOffset(uint32_t Sect, uint32_t Offset, uint16_t &ModuleIndex) const