diff options
Diffstat (limited to 'lib/DebugInfo/PDB/Native/PDBFile.cpp')
| -rw-r--r-- | lib/DebugInfo/PDB/Native/PDBFile.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/DebugInfo/PDB/Native/PDBFile.cpp b/lib/DebugInfo/PDB/Native/PDBFile.cpp index 78b11937f051..a1f8786ff12f 100644 --- a/lib/DebugInfo/PDB/Native/PDBFile.cpp +++ b/lib/DebugInfo/PDB/Native/PDBFile.cpp @@ -125,7 +125,7 @@ Error PDBFile::parseFileHeaders() { if (auto EC = Reader.readObject(SB)) { consumeError(std::move(EC)); return make_error<RawError>(raw_error_code::corrupt_file, - "Does not contain superblock"); + "MSF superblock is missing"); } if (auto EC = msf::validateSuperBlock(*SB)) @@ -401,7 +401,9 @@ uint32_t PDBFile::getPointerSize() { return 4; } -bool PDBFile::hasPDBDbiStream() const { return StreamDBI < getNumStreams(); } +bool PDBFile::hasPDBDbiStream() const { + return StreamDBI < getNumStreams() && getStreamByteSize(StreamDBI) > 0; +} bool PDBFile::hasPDBGlobalsStream() { auto DbiS = getPDBDbiStream(); |
