Go to the documentation of this file.
9 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_INPUTFILE_H
10 #define LLVM_DEBUGINFO_PDB_NATIVE_INPUTFILE_H
26 class LazyRandomTypeCollection;
37 class SymbolGroupIterator;
43 std::unique_ptr<NativeSession> PdbSession;
45 std::unique_ptr<MemoryBuffer> UnknownFile;
48 using TypeCollectionPtr = std::unique_ptr<codeview::LazyRandomTypeCollection>;
50 TypeCollectionPtr Types;
51 TypeCollectionPtr Ids;
53 enum TypeCollectionKind { kTypes, kIds };
55 getOrCreateTypeCollection(TypeCollectionKind
Kind);
65 bool AllowUnknownFile =
false);
101 bool Append =
false)
const;
104 bool Append =
false)
const;
119 void initializeForPdb(
uint32_t Modi);
123 void rebuildChecksumMap();
127 std::shared_ptr<ModuleDebugStreamRef> DebugStream;
134 std::forward_iterator_tag, SymbolGroup> {
148 void scanToNextDebugS();
165 template <
typename CallbackT>
168 CallbackT Callback) {
170 "Mod {0:4} | `{1}`: ",
174 return Callback(Modi, SG);
177 template <
typename CallbackT>
179 CallbackT Callback) {
192 for (
const auto &SG : Input.symbol_groups()) {
204 template <
typename SubsectionT>
213 SubsectionT Subsection;
215 if (SS.kind() != Subsection.kind())
218 BinaryStreamReader Reader(SS.getRecordData());
219 if (auto Err = Subsection.initialize(Reader))
221 if (auto Err = Callback(Modi, SG, Subsection))
llvm::Optional< uint32_t > DumpModi
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)
print alias Alias Set Printer
@ 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)
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.
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)
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.
Optional< std::vector< StOtherPiece > > Other