allow pdb modules to have no C13 data, this happens if the module is stripped

This commit is contained in:
Sahnvour 2019-03-15 21:11:27 +01:00
parent 0d4a5c40bc
commit 094d40fb1a

View File

@ -565,11 +565,12 @@ fn populateModule(di: *DebugInfo, mod: *Module) !void {
return;
const allocator = getDebugInfoAllocator();
if (mod.mod_info.C11ByteSize != 0)
// At most one can be non-zero.
if (mod.mod_info.C11ByteSize != 0 and mod.mod_info.C13ByteSize != 0)
return error.InvalidDebugInfo;
if (mod.mod_info.C13ByteSize == 0)
return error.MissingDebugInfo;
return;
const modi = di.pdb.getStreamById(mod.mod_info.ModuleSymStream) orelse return error.MissingDebugInfo;