LLVM
8.0.1
|
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 74 of file PDBSymbol.h.
|
explicitprotected |
Definition at line 53 of file PDBSymbol.cpp.
|
protected |
Definition at line 55 of file PDBSymbol.cpp.
References Other, and ~PDBSymbol().
|
virtualdefault |
Referenced by createAs(), and PDBSymbol().
|
static |
Definition at line 103 of file PDBSymbol.cpp.
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::DIASession::getSymbolById(), and llvm::pdb::SymbolCache::getSymbolById().
|
static |
Definition at line 111 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::getSymTag(), and RawSymbol.
|
inlinestatic |
Definition at line 91 of file PDBSymbol.h.
References create().
|
inlinestatic |
Definition at line 97 of file PDBSymbol.h.
References create(), dump(), and ~PDBSymbol().
void PDBSymbol::defaultDump | ( | raw_ostream & | OS, |
int | Indent, | ||
PdbSymbolIdField | ShowFlags, | ||
PdbSymbolIdField | RecurseFlags | ||
) | const |
Definition at line 118 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::dump(), and RawSymbol.
Referenced by dumpProperties(), and dumpRight().
|
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::PDBSymbolCustom, llvm::pdb::PDBSymbolTypeUDT, llvm::pdb::PDBSymbolFunc, llvm::pdb::PDBSymbolTypeBaseClass, llvm::pdb::PDBSymbolData, llvm::pdb::PDBSymbolTypeEnum, llvm::pdb::PDBSymbolTypeFunctionSig, llvm::pdb::PDBSymbolCompiland, llvm::pdb::PDBSymbolExe, llvm::pdb::PDBSymbolFuncDebugEnd, llvm::pdb::PDBSymbolUsingNamespace, llvm::pdb::PDBSymbolAnnotation, llvm::pdb::PDBSymbolBlock, llvm::pdb::PDBSymbolCompilandDetails, llvm::pdb::PDBSymbolFuncDebugStart, llvm::pdb::PDBSymbolLabel, llvm::pdb::PDBSymbolPublicSymbol, llvm::pdb::PDBSymbolThunk, llvm::pdb::PDBSymbolTypeArray, llvm::pdb::PDBSymbolTypeBuiltin, llvm::pdb::PDBSymbolTypeCustom, llvm::pdb::PDBSymbolTypeDimension, llvm::pdb::PDBSymbolTypeFriend, llvm::pdb::PDBSymbolTypeFunctionArg, llvm::pdb::PDBSymbolTypeManaged, llvm::pdb::PDBSymbolTypePointer, llvm::pdb::PDBSymbolTypeTypedef, llvm::pdb::PDBSymbolTypeVTable, llvm::pdb::PDBSymbolTypeVTableShape, and llvm::pdb::PDBSymbolCompilandEnv.
Referenced by createAs().
void PDBSymbol::dumpChildStats | ( | ) | const |
Definition at line 130 of file PDBSymbol.cpp.
References llvm::raw_ostream::flush(), getChildStats(), llvm::outs(), and Stats.
Referenced by dumpRight().
void PDBSymbol::dumpProperties | ( | ) | const |
Definition at line 124 of file PDBSymbol.cpp.
References llvm::pdb::All, defaultDump(), llvm::raw_ostream::flush(), llvm::pdb::None, and llvm::outs().
Referenced by dumpRight().
|
inlinevirtual |
For certain PDBSymbolTypes, dumps additional information for the type that normally goes on the right side of the symbol.
Reimplemented in llvm::pdb::PDBSymbolTypeFunctionSig, llvm::pdb::PDBSymbolTypeArray, and llvm::pdb::PDBSymbolTypePointer.
Definition at line 113 of file PDBSymbol.h.
References defaultDump(), dumpChildStats(), dumpProperties(), getSymIndexId(), getSymTag(), and Indent.
|
inline |
Definition at line 131 of file PDBSymbol.h.
References llvm::pdb::IPDBRawSymbol::findChildren(), findChildren(), findChildrenByRVA(), findInlineFramesByRVA(), Name, and llvm::Tag.
Referenced by findAllChildren(), getChildStats(), and llvm::pdb::UDTLayoutBase::initializeChildren().
std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findAllChildren | ( | PDB_SymType | Type | ) | const |
Definition at line 148 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::findChildren(), and RawSymbol.
std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findAllChildren | ( | ) | const |
Definition at line 143 of file PDBSymbol.cpp.
References findAllChildren(), and llvm::pdb::None.
std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findChildren | ( | PDB_SymType | Type, |
StringRef | Name, | ||
PDB_NameSearchFlags | Flags | ||
) | const |
Definition at line 153 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::findChildren(), and RawSymbol.
Referenced by findAllChildren().
std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findChildrenByRVA | ( | PDB_SymType | Type, |
StringRef | Name, | ||
PDB_NameSearchFlags | Flags, | ||
uint32_t | RVA | ||
) | const |
Definition at line 159 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::findChildrenByRVA(), and RawSymbol.
Referenced by findAllChildren().
std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findInlineFramesByRVA | ( | uint32_t | RVA | ) | const |
Definition at line 165 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::findInlineFramesByRVA(), and RawSymbol.
Referenced by findAllChildren().
|
inline |
Definition at line 123 of file PDBSymbol.h.
References llvm::Enumerator.
std::unique_ptr< IPDBEnumSymbols > PDBSymbol::getChildStats | ( | TagStats & | Stats | ) | const |
Definition at line 170 of file PDBSymbol.cpp.
References findAllChildren().
Referenced by dumpChildStats(), and getSession().
|
inlineprotected |
Definition at line 160 of file PDBSymbol.h.
References getSymbolByIdHelper().
|
inline |
Definition at line 149 of file PDBSymbol.h.
References RawSymbol.
Referenced by llvm::pdb::DIASession::findLineNumbers(), llvm::pdb::DIASession::findSourceFiles(), llvm::pdb::DIASession::getSourceFilesForCompiland(), and getSymbolType().
|
inline |
Definition at line 150 of file PDBSymbol.h.
References RawSymbol.
|
inline |
Definition at line 152 of file PDBSymbol.h.
References getChildStats(), getSymbolByIdHelper(), Session, and Stats.
Referenced by getSymbolType().
Definition at line 182 of file PDBSymbol.cpp.
References llvm::pdb::IPDBSession::getSymbolById(), and Session.
Referenced by getConcreteSymbolByIdHelper(), and getSession().
uint32_t PDBSymbol::getSymIndexId | ( | ) | const |
Definition at line 141 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::getSymIndexId(), and RawSymbol.
Referenced by dumpRight().
PDB_SymType PDBSymbol::getSymTag | ( | ) | const |
Definition at line 140 of file PDBSymbol.cpp.
References llvm::pdb::IPDBRawSymbol::getSymTag(), and RawSymbol.
Referenced by dumpRight().
|
protected |
Definition at line 165 of file PDBSymbol.h.
|
protected |
Definition at line 166 of file PDBSymbol.h.
Referenced by create(), defaultDump(), findAllChildren(), findChildren(), findChildrenByRVA(), findInlineFramesByRVA(), llvm::pdb::PDBSymbolCompilandDetails::getBackEndVersion(), llvm::pdb::PDBSymbolData::getCompilandId(), llvm::pdb::PDBSymbolCustom::getDataBytes(), llvm::pdb::PDBSymbolCompilandDetails::getFrontEndVersion(), llvm::pdb::PDBSymbolData::getLineNumbers(), getRawSymbol(), llvm::pdb::PDBSymbolCompiland::getSourceFileFullPath(), getSymIndexId(), getSymTag(), and llvm::pdb::PDBSymbolCompilandEnv::getValue().
|
protected |
Definition at line 164 of file PDBSymbol.h.
Referenced by llvm::pdb::PDBSymbolData::getCompilandId(), llvm::pdb::PDBSymbolData::getLineNumbers(), getSession(), llvm::pdb::PDBSymbolCompiland::getSourceFileFullPath(), and getSymbolByIdHelper().