26 std::unique_ptr<IPDBSession> PDBSession)
30 Session->setLoadAddress(ImageBase.
get());
35std::optional<DILineInfo>
39 Result.FunctionName = getFunctionName(
Address.Address, Specifier.FNKind);
42 std::unique_ptr<PDBSymbol> Symbol =
45 Length = Func->getLength();
58 auto SourceFile = Session->getSourceFileById(LineInfo->getSourceFileId());
62 Result.FileName = SourceFile->getFileName();
63 Result.Column = LineInfo->getColumnNumber();
64 Result.Line = LineInfo->getLineNumber();
68std::optional<DILineInfo>
89 {LineInfo->getVirtualAddress(),
Address.SectionIndex}, Specifier))
91 std::make_pair(LineInfo->getVirtualAddress(), *LineEntry));
104 std::unique_ptr<PDBSymbol> ParentFunc =
111 auto Frames = ParentFunc->findInlineFramesByVA(
Address.Address);
112 if (!Frames || Frames->getChildCount() == 0) {
117 while (
auto Frame = Frames->getNext()) {
123 std::unique_ptr<IPDBLineNumber> Line =
LineNumbers->getNext();
128 auto SourceFile = Session->getSourceFileById(Line->getSourceFileId());
131 LineInfo.FileName = SourceFile->getFileName();
132 LineInfo.Line = Line->getLineNumber();
133 LineInfo.Column = Line->getColumnNumber();
143 return std::vector<DILocal>();
149 return std::string();
151 std::unique_ptr<PDBSymbol> FuncSymbol =
165 if (!Func || Func->getVirtualAddress() == PS->getVirtualAddress())
166 return PS->getName();
170 return Func ? Func->getName() : std::string();
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
DIContext(DIContextKind K)
A format-neutral container for inlined code description.
Represents either an error or a value T.
void push_back(const T &Elt)
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
std::optional< DILineInfo > getLineInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
std::optional< DILineInfo > getLineInfoForDataAddress(object::SectionedAddress Address) 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
auto dyn_cast_or_null(const Y &Val)
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.