26 std::unique_ptr<IPDBSession> PDBSession)
30 Session->setLoadAddress(ImageBase.
get());
38 Result.FunctionName = getFunctionName(
Address.Address, Specifier.
FNKind);
41 std::unique_ptr<PDBSymbol> Symbol =
43 if (
auto Func = dyn_cast_or_null<PDBSymbolFunc>(Symbol.get())) {
44 Length = Func->getLength();
45 }
else if (
auto Data = dyn_cast_or_null<PDBSymbolData>(Symbol.get())) {
57 auto SourceFile = Session->getSourceFileById(LineInfo->getSourceFileId());
60 Specifier.
FLIKind != DILineInfoSpecifier::FileLineInfoKind::None)
61 Result.FileName = SourceFile->getFileName();
62 Result.Column = LineInfo->getColumnNumber();
63 Result.Line = LineInfo->getLineNumber();
88 {LineInfo->getVirtualAddress(),
Address.SectionIndex}, Specifier);
89 Table.
push_back(std::make_pair(LineInfo->getVirtualAddress(), LineEntry));
101 std::unique_ptr<PDBSymbol> ParentFunc =
108 auto Frames = ParentFunc->findInlineFramesByVA(
Address.Address);
109 if (!Frames || Frames->getChildCount() == 0) {
114 while (
auto Frame = Frames->getNext()) {
120 std::unique_ptr<IPDBLineNumber> Line =
LineNumbers->getNext();
125 auto SourceFile = Session->getSourceFileById(Line->getSourceFileId());
127 Specifier.
FLIKind != DILineInfoSpecifier::FileLineInfoKind::None)
128 LineInfo.
FileName = SourceFile->getFileName();
129 LineInfo.
Line = Line->getLineNumber();
130 LineInfo.
Column = Line->getColumnNumber();
140 return std::vector<DILocal>();
146 return std::string();
148 std::unique_ptr<PDBSymbol> FuncSymbol =
150 auto *Func = dyn_cast_or_null<PDBSymbolFunc>(FuncSymbol.get());
158 if (
auto *PS = dyn_cast_or_null<PDBSymbolPublicSymbol>(PublicSym.get())) {
162 if (!Func || Func->getVirtualAddress() == PS->getVirtualAddress())
163 return PS->getName();
167 return Func ? Func->getName() : std::string();
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A format-neutral container for inlined code description.
Represents either an error or a value T.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
DILineInfoTable getLineInfoForAddressRange(object::SectionedAddress Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
DIInliningInfo getInliningInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
std::vector< DILocal > getLocalsForAddress(object::SectionedAddress Address) override
DILineInfo getLineInfoForDataAddress(object::SectionedAddress Address) override
DILineInfo getLineInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
PDBContext(const object::COFFObjectFile &Object, std::unique_ptr< IPDBSession > PDBSession)
void dump(raw_ostream &OS, DIDumpOptions DIDumpOpts) override
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
SmallVector< std::pair< uint64_t, DILineInfo >, 16 > DILineInfoTable
DINameKind
A DINameKind is passed to name search methods to specify a preference regarding the type of name reso...
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
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 source line information.