24 return make_error<RawError>(
26 "Encountered unsupported globals stream version.");
41 uint32_t NumBitmapEntries = BitmapSizeInBits / 8;
42 if (
auto EC = Reader.
readBytes(Bitmap, NumBitmapEntries))
45 "Could not read a bitmap."));
47 for (uint8_t
B : Bitmap)
51 if (
auto EC = Reader.
readArray(HashBuckets, NumBuckets))
54 "Hash buckets corrupted."));
63 "Stream does not contain a GSIHashHeader.");
66 return make_error<RawError>(
68 "GSIHashHeader signature (0xffffffff) not found.");
83 "Invalid HR array size.");
85 if (
auto EC = Reader.
readArray(HashRecords, NumHashRecords))
88 "Error reading hash records."));
static const unsigned IPHR_HASH
From https://github.com/Microsoft/microsoft-pdb/blob/master/PDB/dbi/gsi.cpp.
uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew=0)
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Alig...
static Error checkHashHdrVersion(const GSIHashHeader *HashHdr)
Error readGSIHashBuckets(msf::FixedStreamArray< support::ulittle32_t > &HashBuckets, const GSIHashHeader *HashHdr, msf::StreamReader &Reader)
static GCRegistry::Add< OcamlGC > B("ocaml","ocaml 3.10-compatible GC")
Error readBytes(ArrayRef< uint8_t > &Buffer, uint32_t Size)
Error readArray(ArrayRef< T > &Array, uint32_t NumElements)
Error readGSIHashHeader(const GSIHashHeader *&HashHdr, msf::StreamReader &Reader)
static ErrorSuccess success()
Create a success value.
unsigned countPopulation(T Value)
Count the number of set bits in a value.
Error joinErrors(Error E1, Error E2)
Concatenate errors.
Lightweight error class with error context and mandatory checking.
Error readGSIHashRecords(msf::FixedStreamArray< PSHashRecord > &HashRecords, const GSIHashHeader *HashHdr, msf::StreamReader &Reader)
Error readObject(const T *&Dest)