LLVM 22.0.0git
llvm::pdb::NativeSession Class Reference

#include "llvm/DebugInfo/PDB/Native/NativeSession.h"

Inheritance diagram for llvm::pdb::NativeSession:
[legend]

Public Member Functions

 NativeSession (std::unique_ptr< PDBFile > PdbFile, std::unique_ptr< BumpPtrAllocator > Allocator)
 ~NativeSession () override
uint64_t getLoadAddress () const override
bool setLoadAddress (uint64_t Address) override
std::unique_ptr< PDBSymbolExegetGlobalScope () override
std::unique_ptr< PDBSymbolgetSymbolById (SymIndexId SymbolId) const override
bool addressForVA (uint64_t VA, uint32_t &Section, uint32_t &Offset) const override
bool addressForRVA (uint32_t RVA, uint32_t &Section, uint32_t &Offset) const override
std::unique_ptr< PDBSymbolfindSymbolByAddress (uint64_t Address, PDB_SymType Type) override
std::unique_ptr< PDBSymbolfindSymbolByRVA (uint32_t RVA, PDB_SymType Type) override
std::unique_ptr< PDBSymbolfindSymbolBySectOffset (uint32_t Sect, uint32_t Offset, PDB_SymType Type) override
std::unique_ptr< IPDBEnumLineNumbersfindLineNumbers (const PDBSymbolCompiland &Compiland, const IPDBSourceFile &File) const override
std::unique_ptr< IPDBEnumLineNumbersfindLineNumbersByAddress (uint64_t Address, uint32_t Length) const override
std::unique_ptr< IPDBEnumLineNumbersfindLineNumbersByRVA (uint32_t RVA, uint32_t Length) const override
std::unique_ptr< IPDBEnumLineNumbersfindLineNumbersBySectOffset (uint32_t Section, uint32_t Offset, uint32_t Length) const override
std::unique_ptr< IPDBEnumSourceFilesfindSourceFiles (const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
std::unique_ptr< IPDBSourceFilefindOneSourceFile (const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
std::unique_ptr< IPDBEnumChildren< PDBSymbolCompiland > > findCompilandsForSourceFile (llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
std::unique_ptr< PDBSymbolCompilandfindOneCompilandForSourceFile (llvm::StringRef Pattern, PDB_NameSearchFlags Flags) const override
std::unique_ptr< IPDBEnumSourceFilesgetAllSourceFiles () const override
std::unique_ptr< IPDBEnumSourceFilesgetSourceFilesForCompiland (const PDBSymbolCompiland &Compiland) const override
std::unique_ptr< IPDBSourceFilegetSourceFileById (uint32_t FileId) const override
std::unique_ptr< IPDBEnumDataStreamsgetDebugStreams () const override
std::unique_ptr< IPDBEnumTablesgetEnumTables () const override
std::unique_ptr< IPDBEnumInjectedSourcesgetInjectedSources () const override
std::unique_ptr< IPDBEnumSectionContribsgetSectionContribs () const override
std::unique_ptr< IPDBEnumFrameDatagetFrameData () const override
PDBFilegetPDBFile ()
const PDBFilegetPDBFile () const
NativeExeSymbolgetNativeGlobalScope () const
SymbolCachegetSymbolCache ()
const SymbolCachegetSymbolCache () const
uint32_t getRVAFromSectOffset (uint32_t Section, uint32_t Offset) const
uint64_t getVAFromSectOffset (uint32_t Section, uint32_t Offset) const
bool moduleIndexForVA (uint64_t VA, uint16_t &ModuleIndex) const
bool moduleIndexForSectOffset (uint32_t Sect, uint32_t Offset, uint16_t &ModuleIndex) const
Expected< ModuleDebugStreamRefgetModuleDebugStream (uint32_t Index) const
Public Member Functions inherited from llvm::pdb::IPDBSession
virtual ~IPDBSession ()
template<typename T>
std::unique_ptr< TgetConcreteSymbolById (SymIndexId SymbolId) const

Static Public Member Functions

static Error createFromPdb (std::unique_ptr< MemoryBuffer > MB, std::unique_ptr< IPDBSession > &Session)
static Error createFromPdbPath (StringRef PdbPath, std::unique_ptr< IPDBSession > &Session)
static Error createFromExe (StringRef Path, std::unique_ptr< IPDBSession > &Session)
static Expected< std::string > searchForPdb (const PdbSearchOptions &Opts)

Detailed Description

Definition at line 33 of file NativeSession.h.

Constructor & Destructor Documentation

◆ NativeSession()

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

Definition at line 64 of file NativeSession.cpp.

References getDbiStreamPtr(), and llvm::move().

Referenced by getNativeGlobalScope().

◆ ~NativeSession()

Member Function Documentation

◆ addressForRVA()

bool NativeSession::addressForRVA ( uint32_t RVA,
uint32_t & Section,
uint32_t & Offset ) const
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 225 of file NativeSession.cpp.

References llvm::pdb::Offset, and llvm::size().

Referenced by addressForVA(), findSymbolByRVA(), and ~NativeSession().

◆ addressForVA()

bool NativeSession::addressForVA ( uint64_t VA,
uint32_t & Section,
uint32_t & Offset ) const
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 219 of file NativeSession.cpp.

References addressForRVA(), getLoadAddress(), and llvm::pdb::Offset.

Referenced by findSymbolByAddress(), and ~NativeSession().

◆ createFromExe()

◆ createFromPdb()

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

Definition at line 71 of file NativeSession.cpp.

References llvm::little, llvm::pdb::Path, and llvm::Error::success().

Referenced by ~NativeSession().

◆ createFromPdbPath()

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

◆ findCompilandsForSourceFile()

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

Implements llvm::pdb::IPDBSession.

Definition at line 311 of file NativeSession.cpp.

Referenced by ~NativeSession().

◆ findLineNumbers()

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

Implements llvm::pdb::IPDBSession.

Definition at line 273 of file NativeSession.cpp.

References llvm::pdb::Compiland.

Referenced by ~NativeSession().

◆ findLineNumbersByAddress()

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

Implements llvm::pdb::IPDBSession.

Definition at line 279 of file NativeSession.cpp.

References llvm::pdb::Address, and llvm::Length.

Referenced by ~NativeSession().

◆ findLineNumbersByRVA()

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

Implements llvm::pdb::IPDBSession.

Definition at line 285 of file NativeSession.cpp.

References getLoadAddress(), and llvm::Length.

Referenced by ~NativeSession().

◆ findLineNumbersBySectOffset()

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

Implements llvm::pdb::IPDBSession.

Definition at line 290 of file NativeSession.cpp.

References getVAFromSectOffset(), llvm::Length, and llvm::pdb::Offset.

Referenced by ~NativeSession().

◆ findOneCompilandForSourceFile()

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

Implements llvm::pdb::IPDBSession.

Definition at line 317 of file NativeSession.cpp.

Referenced by ~NativeSession().

◆ findOneSourceFile()

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

Implements llvm::pdb::IPDBSession.

Definition at line 304 of file NativeSession.cpp.

References llvm::pdb::Compiland.

Referenced by ~NativeSession().

◆ findSourceFiles()

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

Implements llvm::pdb::IPDBSession.

Definition at line 297 of file NativeSession.cpp.

References llvm::pdb::Compiland.

Referenced by ~NativeSession().

◆ findSymbolByAddress()

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

◆ findSymbolByRVA()

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

◆ findSymbolBySectOffset()

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

Implements llvm::pdb::IPDBSession.

Definition at line 264 of file NativeSession.cpp.

References llvm::pdb::Offset, and llvm::pdb::Type.

Referenced by findSymbolByAddress(), findSymbolByRVA(), and ~NativeSession().

◆ getAllSourceFiles()

std::unique_ptr< IPDBEnumSourceFiles > NativeSession::getAllSourceFiles ( ) const
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 322 of file NativeSession.cpp.

Referenced by ~NativeSession().

◆ getDebugStreams()

std::unique_ptr< IPDBEnumDataStreams > NativeSession::getDebugStreams ( ) const
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 336 of file NativeSession.cpp.

Referenced by ~NativeSession().

◆ getEnumTables()

std::unique_ptr< IPDBEnumTables > NativeSession::getEnumTables ( ) const
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 340 of file NativeSession.cpp.

Referenced by ~NativeSession().

◆ getFrameData()

std::unique_ptr< IPDBEnumFrameData > NativeSession::getFrameData ( ) const
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 365 of file NativeSession.cpp.

Referenced by ~NativeSession().

◆ getGlobalScope()

std::unique_ptr< PDBSymbolExe > NativeSession::getGlobalScope ( )
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 210 of file NativeSession.cpp.

References llvm::pdb::PDBSymbol::createAs(), and getNativeGlobalScope().

Referenced by ~NativeSession().

◆ getInjectedSources()

std::unique_ptr< IPDBEnumInjectedSources > NativeSession::getInjectedSources ( ) const
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 345 of file NativeSession.cpp.

References llvm::consumeError().

Referenced by ~NativeSession().

◆ getLoadAddress()

uint64_t NativeSession::getLoadAddress ( ) const
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 203 of file NativeSession.cpp.

Referenced by addressForVA(), findLineNumbersByRVA(), and ~NativeSession().

◆ getModuleDebugStream()

◆ getNativeGlobalScope()

NativeExeSymbol & NativeSession::getNativeGlobalScope ( ) const

Definition at line 374 of file NativeSession.cpp.

References NativeSession().

Referenced by getGlobalScope().

◆ getPDBFile() [1/2]

PDBFile & llvm::pdb::NativeSession::getPDBFile ( )
inline

Definition at line 110 of file NativeSession.h.

Referenced by getDbiStreamPtr().

◆ getPDBFile() [2/2]

const PDBFile & llvm::pdb::NativeSession::getPDBFile ( ) const
inline

Definition at line 111 of file NativeSession.h.

◆ getRVAFromSectOffset()

uint32_t NativeSession::getRVAFromSectOffset ( uint32_t Section,
uint32_t Offset ) const

Definition at line 380 of file NativeSession.cpp.

References getDbiStreamPtr(), and llvm::pdb::Offset.

Referenced by getVAFromSectOffset().

◆ getSectionContribs()

std::unique_ptr< IPDBEnumSectionContribs > NativeSession::getSectionContribs ( ) const
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 360 of file NativeSession.cpp.

Referenced by ~NativeSession().

◆ getSourceFileById()

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

Implements llvm::pdb::IPDBSession.

Definition at line 332 of file NativeSession.cpp.

Referenced by ~NativeSession().

◆ getSourceFilesForCompiland()

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

Implements llvm::pdb::IPDBSession.

Definition at line 326 of file NativeSession.cpp.

References llvm::pdb::Compiland.

Referenced by ~NativeSession().

◆ getSymbolById()

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

Implements llvm::pdb::IPDBSession.

Definition at line 215 of file NativeSession.cpp.

Referenced by ~NativeSession().

◆ getSymbolCache() [1/2]

SymbolCache & llvm::pdb::NativeSession::getSymbolCache ( )
inline

Definition at line 114 of file NativeSession.h.

◆ getSymbolCache() [2/2]

const SymbolCache & llvm::pdb::NativeSession::getSymbolCache ( ) const
inline

Definition at line 115 of file NativeSession.h.

◆ getVAFromSectOffset()

uint64_t NativeSession::getVAFromSectOffset ( uint32_t Section,
uint32_t Offset ) const

◆ moduleIndexForSectOffset()

bool NativeSession::moduleIndexForSectOffset ( uint32_t Sect,
uint32_t Offset,
uint16_t & ModuleIndex ) const

Definition at line 410 of file NativeSession.cpp.

References getVAFromSectOffset(), and llvm::pdb::Offset.

◆ moduleIndexForVA()

bool NativeSession::moduleIndexForVA ( uint64_t VA,
uint16_t & ModuleIndex ) const

Definition at line 401 of file NativeSession.cpp.

◆ searchForPdb()

◆ setLoadAddress()

bool NativeSession::setLoadAddress ( uint64_t Address)
overridevirtual

Implements llvm::pdb::IPDBSession.

Definition at line 205 of file NativeSession.cpp.

References llvm::pdb::Address.

Referenced by ~NativeSession().


The documentation for this class was generated from the following files: