LLVM 20.0.0git
|
PDBSymbol defines the base of the inheritance hierarchy for concrete symbol types (e.g. More...
#include "llvm/DebugInfo/PDB/PDBSymbol.h"
Static Public Member Functions | |
static std::unique_ptr< PDBSymbol > | create (const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > RawSymbol) |
static std::unique_ptr< PDBSymbol > | create (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< PDBSymbol > | getSymbolByIdHelper (uint32_t Id) const |
template<typename ConcreteType > | |
std::unique_ptr< ConcreteType > | getConcreteSymbolByIdHelper (uint32_t Id) const |
Protected Attributes | |
const IPDBSession & | Session |
std::unique_ptr< IPDBRawSymbol > | OwnedRawSymbol |
IPDBRawSymbol * | RawSymbol = nullptr |
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.
|
explicitprotected |
Definition at line 52 of file PDBSymbol.cpp.
|
protected |
Definition at line 54 of file PDBSymbol.cpp.
|
virtualdefault |
|
static |
Definition at line 110 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::getSymTag(), and RawSymbol.
|
static |
Definition at line 102 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::getSymTag(), and RawSymbol.
Referenced by createAs(), llvm::pdb::DIASession::findSymbolByAddress(), llvm::pdb::DIASession::findSymbolByRVA(), llvm::pdb::DIASession::findSymbolBySectOffset(), llvm::pdb::DIAEnumSymbols::getChildAtIndex(), llvm::pdb::DIASession::getGlobalScope(), llvm::pdb::DIAEnumSymbols::getNext(), llvm::pdb::SymbolCache::getSymbolById(), and llvm::pdb::DIASession::getSymbolById().
|
inlinestatic |
Definition at line 94 of file PDBSymbol.h.
|
inlinestatic |
Definition at line 88 of file PDBSymbol.h.
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().
|
pure virtual |
Dumps the contents of a symbol a raw_ostream.
By default this will just call dump() on the underlying RawSymbol, which allows us to discover unknown properties, but individual implementations of PDBSymbol may override the behavior to only dump known fields.
Implemented in llvm::pdb::PDBSymbolAnnotation, llvm::pdb::PDBSymbolBlock, llvm::pdb::PDBSymbolCompiland, llvm::pdb::PDBSymbolCompilandDetails, llvm::pdb::PDBSymbolCompilandEnv, llvm::pdb::PDBSymbolCustom, llvm::pdb::PDBSymbolData, llvm::pdb::PDBSymbolExe, llvm::pdb::PDBSymbolFunc, llvm::pdb::PDBSymbolFuncDebugEnd, llvm::pdb::PDBSymbolFuncDebugStart, llvm::pdb::PDBSymbolLabel, llvm::pdb::PDBSymbolPublicSymbol, llvm::pdb::PDBSymbolThunk, llvm::pdb::PDBSymbolTypeArray, llvm::pdb::PDBSymbolTypeBaseClass, llvm::pdb::PDBSymbolTypeBuiltin, llvm::pdb::PDBSymbolTypeCustom, llvm::pdb::PDBSymbolTypeDimension, llvm::pdb::PDBSymbolTypeEnum, llvm::pdb::PDBSymbolTypeFriend, llvm::pdb::PDBSymbolTypeFunctionArg, llvm::pdb::PDBSymbolTypeFunctionSig, llvm::pdb::PDBSymbolTypeManaged, llvm::pdb::PDBSymbolTypePointer, llvm::pdb::PDBSymbolTypeTypedef, llvm::pdb::PDBSymbolTypeUDT, llvm::pdb::PDBSymbolTypeVTable, llvm::pdb::PDBSymbolTypeVTableShape, and llvm::pdb::PDBSymbolUsingNamespace.
void PDBSymbol::dumpChildStats | ( | ) | const |
Definition at line 129 of file PDBSymbol.cpp.
References llvm::raw_ostream::flush(), getChildStats(), llvm::outs(), and Stats.
void PDBSymbol::dumpProperties | ( | ) | const |
Definition at line 123 of file PDBSymbol.cpp.
References llvm::pdb::All, defaultDump(), llvm::raw_ostream::flush(), llvm::pdb::None, and llvm::outs().
|
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.
|
inline |
Definition at line 128 of file PDBSymbol.h.
References llvm::pdb::IPDBRawSymbol::findChildren(), and RawSymbol.
Referenced by findAllChildren(), and getChildStats().
std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findAllChildren | ( | ) | const |
Definition at line 142 of file PDBSymbol.cpp.
References findAllChildren(), and llvm::pdb::None.
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.
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.
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.
std::unique_ptr< IPDBEnumLineNumbers > PDBSymbol::findInlineeLinesByRVA | ( | uint32_t | RVA, |
uint32_t | Length | ||
) | const |
Definition at line 179 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::findInlineeLinesByRVA(), llvm::Length, and RawSymbol.
std::unique_ptr< IPDBEnumLineNumbers > PDBSymbol::findInlineeLinesByVA | ( | uint64_t | VA, |
uint32_t | Length | ||
) | const |
Definition at line 174 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::findInlineeLinesByVA(), llvm::Length, and RawSymbol.
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.
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.
Definition at line 120 of file PDBSymbol.h.
References llvm::Enumerator.
std::unique_ptr< IPDBEnumSymbols > PDBSymbol::getChildStats | ( | TagStats & | Stats | ) | const |
Definition at line 186 of file PDBSymbol.cpp.
References findAllChildren(), and Stats.
Referenced by dumpChildStats().
|
inlineprotected |
Definition at line 164 of file PDBSymbol.h.
References getSymbolByIdHelper().
std::string PDBSymbol::getName | ( | ) | const |
Definition at line 183 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::getName(), and RawSymbol.
Referenced by llvm::pdb::PDBSymbolFunc::isDestructor().
|
inline |
Definition at line 154 of file PDBSymbol.h.
References RawSymbol.
|
inline |
Definition at line 153 of file PDBSymbol.h.
References RawSymbol.
|
inline |
Definition at line 156 of file PDBSymbol.h.
References Session.
Definition at line 198 of file PDBSymbol.cpp.
References llvm::pdb::IPDBSession::getSymbolById(), and Session.
Referenced by getConcreteSymbolByIdHelper().
uint32_t PDBSymbol::getSymIndexId | ( | ) | const |
Definition at line 140 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::getSymIndexId(), and RawSymbol.
PDB_SymType PDBSymbol::getSymTag | ( | ) | const |
Definition at line 139 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::getSymTag(), and RawSymbol.
|
protected |
Definition at line 169 of file PDBSymbol.h.
|
protected |
Definition at line 170 of file PDBSymbol.h.
Referenced by create(), createAs(), defaultDump(), findAllChildren(), findChildren(), findChildrenByRVA(), findInlineeLinesByRVA(), findInlineeLinesByVA(), findInlineFramesByRVA(), findInlineFramesByVA(), llvm::pdb::PDBSymbolCompilandDetails::getBackEndVersion(), llvm::pdb::PDBSymbolData::getCompilandId(), llvm::pdb::PDBSymbolCustom::getDataBytes(), llvm::pdb::PDBSymbolCompilandDetails::getFrontEndVersion(), llvm::pdb::PDBSymbolData::getLineNumbers(), getName(), getRawSymbol(), llvm::pdb::PDBSymbolCompiland::getSourceFileFullPath(), getSymIndexId(), getSymTag(), and llvm::pdb::PDBSymbolCompilandEnv::getValue().
|
protected |
Definition at line 168 of file PDBSymbol.h.
Referenced by llvm::pdb::PDBSymbolFunc::getArguments(), llvm::pdb::PDBSymbolTypeFunctionSig::getArguments(), llvm::pdb::PDBSymbolData::getCompilandId(), llvm::pdb::PDBSymbolData::getLineNumbers(), getSession(), llvm::pdb::PDBSymbolCompiland::getSourceFileFullPath(), and getSymbolByIdHelper().