commit 094d40fb1a816a02e9f193f856049cf50503fdc4 (tree)
parent 0d4a5c40bc97d65ede1923577b2ca9dac3a6c24f
Author: Sahnvour <sahnvour@pm.me>
Date: Fri, 15 Mar 2019 21:11:27 +0100
allow pdb modules to have no C13 data, this happens if the module is stripped
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/std/debug.zig b/std/debug.zig
@@ -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;