25 std::unique_ptr<IPDBSession> PDBSession)
29 Session->setLoadAddress(ImageBase.
get());
40 std::unique_ptr<PDBSymbol>
Symbol =
42 if (
auto Func = dyn_cast_or_null<PDBSymbolFunc>(Symbol.get())) {
43 Length = Func->getLength();
44 }
else if (
auto Data = dyn_cast_or_null<PDBSymbolData>(Symbol.get())) {
45 Length =
Data->getLength();
50 auto LineNumbers = Session->findLineNumbersByAddress(Address, Length);
56 auto SourceFile = Session->getSourceFileById(LineInfo->getSourceFileId());
60 Result.
FileName = SourceFile->getFileName();
61 Result.
Column = LineInfo->getColumnNumber();
62 Result.
Line = LineInfo->getLineNumber();
73 auto LineNumbers = Session->findLineNumbersByAddress(Address, Size);
80 Table.
push_back(std::make_pair(LineInfo->getVirtualAddress(), LineEntry));
94 std::string PDBContext::getFunctionName(uint64_t
Address,
99 std::unique_ptr<PDBSymbol> FuncSymbol =
101 auto *Func = dyn_cast_or_null<PDBSymbolFunc>(FuncSymbol.get());
109 if (
auto *PS = dyn_cast_or_null<PDBSymbolPublicSymbol>(PublicSym.get())) {
113 if (!Func || Func->getVirtualAddress() == PS->getVirtualAddress())
114 return PS->getName();
118 return Func ? Func->getName() : std::string();
void dump(raw_ostream &OS, DIDumpOptions DIDumpOpts) override
Represents either an error or a value T.
This class represents lattice values for constants.
void push_back(const T &Elt)
uint64_t getImageBase() const
void addFrame(const DILineInfo &Frame)
DINameKind
A DINameKind is passed to name search methods to specify a preference regarding the type of name reso...
A format-neutral container for source line information.
DILineInfo getLineInfoForAddress(uint64_t Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
Container for dump options that control which debug information will be dumped.
Controls which fields of DILineInfo container should be filled with data.
A format-neutral container for inlined code description.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
DIInliningInfo getInliningInfoForAddress(uint64_t Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
SmallVector< std::pair< uint64_t, DILineInfo >, 16 > DILineInfoTable
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
DILineInfoTable getLineInfoForAddressRange(uint64_t Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
This class implements an extremely fast bulk output stream that can only output to a stream...