We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6524a64 commit fd067fbCopy full SHA for fd067fb
lib/std/debug.zig
@@ -1295,10 +1295,13 @@ pub const DebugInfo = struct {
1295
const obj_di = try self.allocator.create(ModuleDebugInfo);
1296
errdefer self.allocator.destroy(obj_di);
1297
1298
- const elf_file = (if (ctx.name.len > 0)
+ // TODO https://github.com/ziglang/zig/issues/5525
1299
+ const copy = if (ctx.name.len > 0)
1300
fs.cwd().openFile(ctx.name, .{ .intended_io_mode = .blocking })
1301
else
- fs.openSelfExe(.{ .intended_io_mode = .blocking })) catch |err| switch (err) {
1302
+ fs.openSelfExe(.{ .intended_io_mode = .blocking });
1303
+
1304
+ const elf_file = copy catch |err| switch (err) {
1305
error.FileNotFound => return error.MissingDebugInfo,
1306
else => return err,
1307
};
0 commit comments