Go to the documentation of this file.
9 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_INPUTFILE_H
10 #define LLVM_DEBUGINFO_PDB_NATIVE_INPUTFILE_H
25 class LazyRandomTypeCollection;
36 class SymbolGroupIterator;
42 std::unique_ptr<NativeSession> PdbSession;
44 std::unique_ptr<MemoryBuffer> UnknownFile;
47 using TypeCollectionPtr = std::unique_ptr<codeview::LazyRandomTypeCollection>;
49 TypeCollectionPtr Types;
50 TypeCollectionPtr Ids;
52 enum TypeCollectionKind { kTypes, kIds };
54 getOrCreateTypeCollection(TypeCollectionKind Kind);
64 bool AllowUnknownFile =
false);
100 bool Append =
false)
const;
103 bool Append =
false)
const;
118 void initializeForPdb(
uint32_t Modi);
122 void rebuildChecksumMap();
126 std::shared_ptr<ModuleDebugStreamRef> DebugStream;
133 std::forward_iterator_tag, SymbolGroup> {
147 void scanToNextDebugS();
151 std::optional<object::section_iterator> SectionIter;
164 template <
typename CallbackT>
167 CallbackT Callback) {
169 "Mod {0:4} | `{1}`: ",
173 return Callback(Modi, SG);
176 template <
typename CallbackT>
178 CallbackT Callback) {
203 template <
typename SubsectionT>
212 SubsectionT Subsection;
214 if (SS.kind() != Subsection.kind())
217 BinaryStreamReader Reader(SS.getRecordData());
218 if (auto Err = Subsection.initialize(Reader))
220 if (auto Err = Callback(Modi, SG, Subsection))
This is an optimization pass for GlobalISel generic memory operations.
const SymbolGroup & operator*() const
int NumDigits(uint64_t N)
Returns the number of digits in the given integer.
static ErrorSuccess success()
Create a success value.
Expected< StringRef > getNameFromStringTable(uint32_t Offset) const
void formatFromFileName(LinePrinter &Printer, StringRef File, bool Append=false) const
bool operator==(const SymbolGroupIterator &R) const
Tagged union holding either a T or a Error.
Expected< StringRef > getNameFromChecksums(uint32_t Offset) const
This interface provides simple read-only access to a block of memory, and provides simple methods for...
SymbolGroupIterator & operator++()
PrintScope withLabelWidth(const PrintScope &Scope, uint32_t W)
@ SC
CHAIN = SC CHAIN, Imm128 - System call.
SymbolGroup(InputFile *File, uint32_t GroupIndex=0)
Provides amortized O(1) random access to a CodeView type stream.
codeview::DebugSubsectionArray getDebugSubsections() const
Error iterateSymbolGroups(InputFile &Input, const PrintScope &HeaderScope, CallbackT Callback)
std::optional< uint32_t > DumpModi
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Expected< ModuleDebugStreamRef > getModuleDebugStream(PDBFile &File, StringRef &ModuleName, uint32_t Index)
An efficient, type-erasing, non-owning reference to a callable.
bar al al movzbl eax ret Missed when stored in a memory object
void formatLine(const char *Fmt, Ts &&...Items)
const ModuleDebugStreamRef & getPdbModuleStream() const
void formatFromChecksumsOffset(LinePrinter &Printer, uint32_t Offset, bool Append=false) const
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
Error iterateOneModule(InputFile &File, const PrintScope &HeaderScope, const SymbolGroup &SG, uint32_t Modi, CallbackT Callback)
const FilterOptions & getFilters() const
StringRef - Represent a constant reference to a string, i.e.
Memory true print Memory SSA Printer
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
Lightweight error class with error context and mandatory checking.
bool shouldDumpSymbolGroup(uint32_t Idx, const SymbolGroup &Group, const FilterOptions &Filters)
Error iterateModuleSubsections(InputFile &File, const PrintScope &HeaderScope, llvm::function_ref< Error(uint32_t, const SymbolGroup &, SubsectionT &)> Callback)
std::optional< std::vector< StOtherPiece > > Other
A range adaptor for a pair of iterators.
SymbolGroupIterator & operator=(const SymbolGroupIterator &R)=default
bool hasDebugStream() const
const InputFile & getFile() const
detail::AlignAdapter< T > fmt_align(T &&Item, AlignStyle Where, size_t Amount, char Fill=' ')
LLVM Value Representation.