28 using namespace llvm::msf;
29 using namespace llvm::pdb;
31 RawSession::RawSession(std::unique_ptr<PDBFile> PdbFile,
32 std::unique_ptr<BumpPtrAllocator>
Allocator)
33 : Pdb(std::move(PdbFile)), Allocator(std::move(Allocator)) {}
38 std::unique_ptr<IPDBSession> &Session) {
45 std::unique_ptr<MemoryBuffer> Buffer = std::move(*ErrorOrBuffer);
46 auto Stream = llvm::make_unique<MemoryBufferByteStream>(std::move(Buffer));
48 auto Allocator = llvm::make_unique<BumpPtrAllocator>();
49 auto File = llvm::make_unique<PDBFile>(std::move(Stream), *Allocator);
50 if (
auto EC = File->parseFileHeaders())
52 if (
auto EC = File->parseStreamData())
56 llvm::make_unique<RawSession>(std::move(File), std::move(Allocator));
62 std::unique_ptr<IPDBSession> &Session) {
78 std::unique_ptr<PDBSymbol>
83 std::unique_ptr<IPDBEnumLineNumbers>
89 std::unique_ptr<IPDBEnumLineNumbers>
94 std::unique_ptr<IPDBEnumSourceFiles>
101 std::unique_ptr<IPDBSourceFile>
108 std::unique_ptr<IPDBEnumChildren<PDBSymbolCompiland>>
114 std::unique_ptr<PDBSymbolCompiland>
129 std::unique_ptr<IPDBSourceFile>
Represents either an error or a value T.
void setLoadAddress(uint64_t Address) override
std::unique_ptr< IPDBSourceFile > findOneSourceFile(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
PDB_NameSearchFlags
Defines flags used for enumerating child symbols.
std::unique_ptr< PDBSymbolExe > getGlobalScope() const override
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
IPDBSourceFile defines an interface used to represent source files whose information are stored in th...
std::unique_ptr< IPDBEnumLineNumbers > findLineNumbersByAddress(uint64_t Address, uint32_t Length) const override
std::unique_ptr< IPDBEnumSourceFiles > findSourceFiles(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
struct fuzzer::@269 Flags
std::unique_ptr< PDBSymbol > getSymbolById(uint32_t SymbolId) const override
std::unique_ptr< PDBSymbolCompiland > findOneCompilandForSourceFile(llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
std::unique_ptr< IPDBSourceFile > getSourceFileById(uint32_t FileId) const override
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/bkedss5f.aspx.
std::unique_ptr< IPDBEnumSourceFiles > getAllSourceFiles() const override
The instances of the Type class are immutable: once they are created, they are never changed...
std::unique_ptr< IPDBEnumDataStreams > getDebugStreams() const override
Greedy Register Allocator
std::unique_ptr< IPDBEnumChildren< PDBSymbolCompiland > > findCompilandsForSourceFile(llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
static Error createFromPdb(StringRef Path, std::unique_ptr< IPDBSession > &Session)
static ErrorSuccess success()
Create a success value.
std::unique_ptr< IPDBEnumLineNumbers > findLineNumbers(const PDBSymbolCompiland &Compiland, const IPDBSourceFile &File) const override
std::unique_ptr< PDBSymbol > findSymbolByAddress(uint64_t Address, PDB_SymType Type) const override
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFileOrSTDIN(const Twine &Filename, int64_t FileSize=-1, bool RequiresNullTerminator=true)
Open the specified file as a MemoryBuffer, or open stdin if the Filename is "-".
std::unique_ptr< IPDBEnumSourceFiles > getSourceFilesForCompiland(const PDBSymbolCompiland &Compiland) const override
Provides ErrorOr<T> smart pointer.
static Error createFromExe(StringRef Path, std::unique_ptr< IPDBSession > &Session)
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
uint64_t getLoadAddress() const override