LLVM 22.0.0git
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:
[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 72 of file PDBSymbol.h.

Constructor & Destructor Documentation

◆ PDBSymbol() [1/2]

PDBSymbol::PDBSymbol ( const IPDBSession & PDBSession)
explicitprotected

Definition at line 52 of file PDBSymbol.cpp.

References Session.

Referenced by PDBSymbol().

◆ PDBSymbol() [2/2]

PDBSymbol::PDBSymbol ( PDBSymbol && Other)
protected

Definition at line 54 of file PDBSymbol.cpp.

References llvm::move(), llvm::Other, PDBSymbol(), RawSymbol, and Session.

◆ ~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 RawSymbol.

◆ create() [2/2]

◆ createAs() [1/2]

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

Definition at line 95 of file PDBSymbol.h.

References create(), RawSymbol, and llvm::unique_dyn_cast_or_null().

◆ createAs() [2/2]

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

◆ defaultDump()

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

Definition at line 117 of file PDBSymbol.cpp.

References RawSymbol.

Referenced by dumpProperties().

◆ dump()

◆ 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 111 of file PDBSymbol.h.

◆ findAllChildren() [1/3]

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

◆ 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 RawSymbol, and llvm::pdb::Type.

◆ 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 RawSymbol, and llvm::pdb::Type.

◆ 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 RawSymbol, and llvm::pdb::Type.

◆ findInlineeLinesByRVA()

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

Definition at line 179 of file PDBSymbol.cpp.

References llvm::Length, and RawSymbol.

◆ findInlineeLinesByVA()

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

Definition at line 174 of file PDBSymbol.cpp.

References llvm::Length, and RawSymbol.

◆ findInlineFramesByRVA()

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

Definition at line 169 of file PDBSymbol.cpp.

References RawSymbol.

◆ findInlineFramesByVA()

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

Definition at line 164 of file PDBSymbol.cpp.

References RawSymbol.

◆ findOneChild()

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

◆ 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 165 of file PDBSymbol.h.

References getSymbolByIdHelper(), and llvm::unique_dyn_cast_or_null().

◆ getName()

std::string PDBSymbol::getName ( ) const

Definition at line 183 of file PDBSymbol.cpp.

References RawSymbol.

Referenced by llvm::pdb::PDBSymbolFunc::isDestructor().

◆ getRawSymbol() [1/2]

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

Definition at line 155 of file PDBSymbol.h.

References RawSymbol.

◆ getRawSymbol() [2/2]

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

Definition at line 154 of file PDBSymbol.h.

References RawSymbol.

◆ getSession()

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

Definition at line 157 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 Session.

Referenced by getConcreteSymbolByIdHelper().

◆ getSymIndexId()

uint32_t PDBSymbol::getSymIndexId ( ) const

Definition at line 140 of file PDBSymbol.cpp.

References RawSymbol.

◆ getSymTag()

PDB_SymType PDBSymbol::getSymTag ( ) const

Definition at line 139 of file PDBSymbol.cpp.

References RawSymbol.

Member Data Documentation

◆ OwnedRawSymbol

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

Definition at line 170 of file PDBSymbol.h.

◆ RawSymbol

◆ Session


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