LLVM: include/llvm/DebugInfo/PDB/Native/NativeSession.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVESESSION_H

10#define LLVM_DEBUGINFO_PDB_NATIVE_NATIVESESSION_H

11

20

21namespace llvm {

23namespace pdb {

32

34 struct PdbSearchOptions {

36

37 };

38

39public:

41 std::unique_ptr Allocator);

43

45 std::unique_ptr &Session);

47 std::unique_ptr &Session);

49 std::unique_ptr &Session);

51

54 std::unique_ptr getGlobalScope() override;

56

61

69

70 std::unique_ptr

73 std::unique_ptr

75 std::unique_ptr

77 std::unique_ptr

80

81 std::unique_ptr

84 std::unique_ptr

88 std::unique_ptr<IPDBEnumChildren>

91 std::unique_ptr

94 std::unique_ptr getAllSourceFiles() const override;

97 std::unique_ptr

99

100 std::unique_ptr getDebugStreams() const override;

101

102 std::unique_ptr getEnumTables() const override;

103

104 std::unique_ptr getInjectedSources() const override;

105

106 std::unique_ptr getSectionContribs() const override;

107

108 std::unique_ptr getFrameData() const override;

109

112

118 bool moduleIndexForVA(uint64_t VA, uint16_t &ModuleIndex) const;

120 uint16_t &ModuleIndex) const;

122

123private:

124 void initializeExeSymbol();

125 void parseSectionContribs();

126

127 std::unique_ptr Pdb;

128 std::unique_ptr Allocator;

129

133

134

135 using IMap =

137 IMap::Allocator IMapAllocator;

138 IMap AddrToModuleIndex;

139};

140}

141}

142

143#endif

This file defines the BumpPtrAllocator interface.

This file implements a coalescing interval map for small objects.

Lightweight error class with error context and mandatory checking.

Tagged union holding either a T or a Error.

This interface provides simple read-only access to a block of memory, and provides simple methods for...

StringRef - Represent a constant reference to a string, i.e.

IPDBSession defines an interface used to provide a context for querying debug information from a debu...

IPDBSourceFile defines an interface used to represent source files whose information are stored in th...

std::unique_ptr< IPDBEnumFrameData > getFrameData() const override

std::unique_ptr< IPDBEnumSourceFiles > getSourceFilesForCompiland(const PDBSymbolCompiland &Compiland) const override

SymbolCache & getSymbolCache()

Definition NativeSession.h:114

static Expected< std::string > searchForPdb(const PdbSearchOptions &Opts)

std::unique_ptr< PDBSymbolExe > getGlobalScope() override

bool addressForVA(uint64_t VA, uint32_t &Section, uint32_t &Offset) const override

std::unique_ptr< IPDBEnumSourceFiles > findSourceFiles(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override

bool addressForRVA(uint32_t RVA, uint32_t &Section, uint32_t &Offset) const override

std::unique_ptr< IPDBEnumLineNumbers > findLineNumbersByRVA(uint32_t RVA, uint32_t Length) const override

std::unique_ptr< IPDBEnumLineNumbers > findLineNumbersBySectOffset(uint32_t Section, uint32_t Offset, uint32_t Length) const override

static Error createFromPdb(std::unique_ptr< MemoryBuffer > MB, std::unique_ptr< IPDBSession > &Session)

static Error createFromExe(StringRef Path, std::unique_ptr< IPDBSession > &Session)

std::unique_ptr< PDBSymbol > findSymbolBySectOffset(uint32_t Sect, uint32_t Offset, PDB_SymType Type) override

const SymbolCache & getSymbolCache() const

Definition NativeSession.h:115

std::unique_ptr< PDBSymbolCompiland > findOneCompilandForSourceFile(llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override

~NativeSession() override

PDBFile & getPDBFile()

Definition NativeSession.h:110

std::unique_ptr< IPDBEnumInjectedSources > getInjectedSources() const override

std::unique_ptr< IPDBEnumTables > getEnumTables() const override

static Error createFromPdbPath(StringRef PdbPath, std::unique_ptr< IPDBSession > &Session)

bool setLoadAddress(uint64_t Address) override

std::unique_ptr< IPDBSourceFile > getSourceFileById(uint32_t FileId) const override

std::unique_ptr< IPDBEnumSectionContribs > getSectionContribs() const override

NativeSession(std::unique_ptr< PDBFile > PdbFile, std::unique_ptr< BumpPtrAllocator > Allocator)

const PDBFile & getPDBFile() const

Definition NativeSession.h:111

std::unique_ptr< IPDBEnumChildren< PDBSymbolCompiland > > findCompilandsForSourceFile(llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override

std::unique_ptr< IPDBEnumLineNumbers > findLineNumbersByAddress(uint64_t Address, uint32_t Length) const override

std::unique_ptr< PDBSymbol > findSymbolByAddress(uint64_t Address, PDB_SymType Type) override

std::unique_ptr< IPDBEnumSourceFiles > getAllSourceFiles() const override

std::unique_ptr< IPDBEnumDataStreams > getDebugStreams() const override

std::unique_ptr< IPDBEnumLineNumbers > findLineNumbers(const PDBSymbolCompiland &Compiland, const IPDBSourceFile &File) const override

std::unique_ptr< PDBSymbol > getSymbolById(SymIndexId SymbolId) const override

std::unique_ptr< IPDBSourceFile > findOneSourceFile(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override

std::unique_ptr< PDBSymbol > findSymbolByRVA(uint32_t RVA, PDB_SymType Type) override

uint64_t getLoadAddress() const override

PDBSymbol defines the base of the inheritance hierarchy for concrete symbol types (e....

PDB_NameSearchFlags

Defines flags used for enumerating child symbols.

PDB_SymType

These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....

LLVM_ABI Expected< ModuleDebugStreamRef > getModuleDebugStream(PDBFile &File, StringRef &ModuleName, uint32_t Index)

This is an optimization pass for GlobalISel generic memory operations.