LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::pdb::PDBSymbol Class Referenceabstract

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

#include "llvm/DebugInfo/PDB/PDBSymbol.h"

Inheritance diagram for llvm::pdb::PDBSymbol:
Inheritance graph
[legend]

Public Member Functions

virtual ~PDBSymbol ()
 
virtual void dump (PDBSymDumper &Dumper) const =0
 Dumps the contents of a symbol a raw_ostream.
 
virtual void dumpRight (PDBSymDumper &Dumper) const
 For certain PDBSymbolTypes, dumps additional information for the type that normally goes on the right side of the symbol.
 
void defaultDump (raw_ostream &OS, int Indent, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags) const
 
void dumpProperties () const
 
void dumpChildStats () const
 
PDB_SymType getSymTag () const
 
uint32_t getSymIndexId () const
 
template<typename T >
std::unique_ptr< TfindOneChild () const
 
template<typename T >
std::unique_ptr< ConcreteSymbolEnumerator< T > > findAllChildren () const
 
std::unique_ptr< IPDBEnumSymbolsfindAllChildren (PDB_SymType Type) const
 
std::unique_ptr< IPDBEnumSymbolsfindAllChildren () const
 
std::unique_ptr< IPDBEnumSymbolsfindChildren (PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags) const
 
std::unique_ptr< IPDBEnumSymbolsfindChildrenByRVA (PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint32_t RVA) const
 
std::unique_ptr< IPDBEnumSymbolsfindInlineFramesByVA (uint64_t VA) const
 
std::unique_ptr< IPDBEnumSymbolsfindInlineFramesByRVA (uint32_t RVA) const
 
std::unique_ptr< IPDBEnumLineNumbersfindInlineeLinesByVA (uint64_t VA, uint32_t Length) const
 
std::unique_ptr< IPDBEnumLineNumbersfindInlineeLinesByRVA (uint32_t RVA, uint32_t Length) const
 
std::string getName () const
 
const IPDBRawSymbolgetRawSymbol () const
 
IPDBRawSymbolgetRawSymbol ()
 
const IPDBSessiongetSession () const
 
std::unique_ptr< IPDBEnumSymbolsgetChildStats (TagStats &Stats) const
 

Static Public Member Functions

static std::unique_ptr< PDBSymbolcreate (const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > RawSymbol)
 
static std::unique_ptr< PDBSymbolcreate (const IPDBSession &PDBSession, IPDBRawSymbol &RawSymbol)
 
template<typename ConcreteT >
static std::unique_ptr< ConcreteT > createAs (const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > RawSymbol)
 
template<typename ConcreteT >
static std::unique_ptr< ConcreteT > createAs (const IPDBSession &PDBSession, IPDBRawSymbol &RawSymbol)
 

Protected Member Functions

 PDBSymbol (const IPDBSession &PDBSession)
 
 PDBSymbol (PDBSymbol &&Other)
 
std::unique_ptr< PDBSymbolgetSymbolByIdHelper (uint32_t Id) const
 
template<typename ConcreteType >
std::unique_ptr< ConcreteType > getConcreteSymbolByIdHelper (uint32_t Id) const
 

Protected Attributes

const IPDBSessionSession
 
std::unique_ptr< IPDBRawSymbolOwnedRawSymbol
 
IPDBRawSymbolRawSymbol = nullptr
 

Detailed Description

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

functions, executables, vtables, etc). All concrete symbol types inherit from PDBSymbol and expose the exact set of methods that are valid for that particular symbol type, as described in the Microsoft reference "Lexical and Class Hierarchy of Symbol Types": https://msdn.microsoft.com/en-us/library/370hs6k4.aspx

Definition at line 71 of file PDBSymbol.h.

Constructor & Destructor Documentation

◆ PDBSymbol() [1/2]

PDBSymbol::PDBSymbol ( const IPDBSession PDBSession)
explicitprotected

Definition at line 52 of file PDBSymbol.cpp.

◆ PDBSymbol() [2/2]

PDBSymbol::PDBSymbol ( PDBSymbol &&  Other)
protected

Definition at line 54 of file PDBSymbol.cpp.

◆ ~PDBSymbol()

PDBSymbol::~PDBSymbol ( )
virtualdefault

Member Function Documentation

◆ create() [1/2]

std::unique_ptr< PDBSymbol > PDBSymbol::create ( const IPDBSession PDBSession,
IPDBRawSymbol RawSymbol 
)
static

Definition at line 110 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::getSymTag(), and RawSymbol.

◆ create() [2/2]

std::unique_ptr< PDBSymbol > PDBSymbol::create ( const IPDBSession PDBSession,
std::unique_ptr< IPDBRawSymbol RawSymbol 
)
static

◆ createAs() [1/2]

template<typename ConcreteT >
static std::unique_ptr< ConcreteT > llvm::pdb::PDBSymbol::createAs ( const IPDBSession PDBSession,
IPDBRawSymbol RawSymbol 
)
inlinestatic

Definition at line 94 of file PDBSymbol.h.

References create(), and RawSymbol.

◆ createAs() [2/2]

template<typename ConcreteT >
static std::unique_ptr< ConcreteT > llvm::pdb::PDBSymbol::createAs ( const IPDBSession PDBSession,
std::unique_ptr< IPDBRawSymbol RawSymbol 
)
inlinestatic

Definition at line 88 of file PDBSymbol.h.

References create(), and RawSymbol.

◆ defaultDump()

void PDBSymbol::defaultDump ( raw_ostream OS,
int  Indent,
PdbSymbolIdField  ShowFlags,
PdbSymbolIdField  RecurseFlags 
) const

Definition at line 117 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::dump(), OS, and RawSymbol.

Referenced by dumpProperties().

◆ dump()

virtual void llvm::pdb::PDBSymbol::dump ( PDBSymDumper Dumper) const
pure virtual

◆ dumpChildStats()

void PDBSymbol::dumpChildStats ( ) const

Definition at line 129 of file PDBSymbol.cpp.

References llvm::raw_ostream::flush(), getChildStats(), llvm::outs(), and Stats.

◆ dumpProperties()

void PDBSymbol::dumpProperties ( ) const

◆ dumpRight()

virtual void llvm::pdb::PDBSymbol::dumpRight ( PDBSymDumper Dumper) const
inlinevirtual

For certain PDBSymbolTypes, dumps additional information for the type that normally goes on the right side of the symbol.

Reimplemented in llvm::pdb::PDBSymbolTypeArray, llvm::pdb::PDBSymbolTypeFunctionSig, and llvm::pdb::PDBSymbolTypePointer.

Definition at line 110 of file PDBSymbol.h.

◆ findAllChildren() [1/3]

template<typename T >
std::unique_ptr< ConcreteSymbolEnumerator< T > > llvm::pdb::PDBSymbol::findAllChildren ( ) const
inline

Definition at line 128 of file PDBSymbol.h.

References llvm::pdb::IPDBRawSymbol::findChildren(), and RawSymbol.

Referenced by findAllChildren(), and getChildStats().

◆ findAllChildren() [2/3]

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findAllChildren ( ) const

Definition at line 142 of file PDBSymbol.cpp.

References findAllChildren(), and llvm::pdb::None.

◆ findAllChildren() [3/3]

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findAllChildren ( PDB_SymType  Type) const

Definition at line 147 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::findChildren(), and RawSymbol.

◆ findChildren()

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findChildren ( PDB_SymType  Type,
StringRef  Name,
PDB_NameSearchFlags  Flags 
) const

Definition at line 152 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::findChildren(), Name, and RawSymbol.

◆ findChildrenByRVA()

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findChildrenByRVA ( PDB_SymType  Type,
StringRef  Name,
PDB_NameSearchFlags  Flags,
uint32_t  RVA 
) const

Definition at line 158 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::findChildrenByRVA(), Name, and RawSymbol.

◆ findInlineeLinesByRVA()

std::unique_ptr< IPDBEnumLineNumbers > PDBSymbol::findInlineeLinesByRVA ( uint32_t  RVA,
uint32_t  Length 
) const

◆ findInlineeLinesByVA()

std::unique_ptr< IPDBEnumLineNumbers > PDBSymbol::findInlineeLinesByVA ( uint64_t  VA,
uint32_t  Length 
) const

◆ findInlineFramesByRVA()

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findInlineFramesByRVA ( uint32_t  RVA) const

Definition at line 169 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::findInlineFramesByRVA(), and RawSymbol.

◆ findInlineFramesByVA()

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findInlineFramesByVA ( uint64_t  VA) const

Definition at line 164 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::findInlineFramesByVA(), and RawSymbol.

◆ findOneChild()

template<typename T >
std::unique_ptr< T > llvm::pdb::PDBSymbol::findOneChild ( ) const
inline

Definition at line 120 of file PDBSymbol.h.

References llvm::Enumerator.

◆ getChildStats()

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::getChildStats ( TagStats Stats) const

Definition at line 186 of file PDBSymbol.cpp.

References findAllChildren(), and Stats.

Referenced by dumpChildStats().

◆ getConcreteSymbolByIdHelper()

template<typename ConcreteType >
std::unique_ptr< ConcreteType > llvm::pdb::PDBSymbol::getConcreteSymbolByIdHelper ( uint32_t  Id) const
inlineprotected

Definition at line 164 of file PDBSymbol.h.

References getSymbolByIdHelper().

◆ getName()

std::string PDBSymbol::getName ( ) const

◆ getRawSymbol() [1/2]

IPDBRawSymbol & llvm::pdb::PDBSymbol::getRawSymbol ( )
inline

Definition at line 154 of file PDBSymbol.h.

References RawSymbol.

◆ getRawSymbol() [2/2]

const IPDBRawSymbol & llvm::pdb::PDBSymbol::getRawSymbol ( ) const
inline

Definition at line 153 of file PDBSymbol.h.

References RawSymbol.

◆ getSession()

const IPDBSession & llvm::pdb::PDBSymbol::getSession ( ) const
inline

Definition at line 156 of file PDBSymbol.h.

References Session.

◆ getSymbolByIdHelper()

std::unique_ptr< PDBSymbol > PDBSymbol::getSymbolByIdHelper ( uint32_t  Id) const
protected

Definition at line 198 of file PDBSymbol.cpp.

References llvm::pdb::IPDBSession::getSymbolById(), and Session.

Referenced by getConcreteSymbolByIdHelper().

◆ getSymIndexId()

uint32_t PDBSymbol::getSymIndexId ( ) const

Definition at line 140 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::getSymIndexId(), and RawSymbol.

◆ getSymTag()

PDB_SymType PDBSymbol::getSymTag ( ) const

Definition at line 139 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::getSymTag(), and RawSymbol.

Member Data Documentation

◆ OwnedRawSymbol

std::unique_ptr<IPDBRawSymbol> llvm::pdb::PDBSymbol::OwnedRawSymbol
protected

Definition at line 169 of file PDBSymbol.h.

◆ RawSymbol

IPDBRawSymbol* llvm::pdb::PDBSymbol::RawSymbol = nullptr
protected

◆ Session

const IPDBSession& llvm::pdb::PDBSymbol::Session
protected

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