| ... | ... | @@ -1295,10 +1295,13 @@ pub const DebugInfo = struct { |
| 1295 | 1295 | const obj_di = try self.allocator.create(ModuleDebugInfo); |
| 1296 | 1296 | errdefer self.allocator.destroy(obj_di); |
| 1297 | 1297 | |
| 1298 | | const elf_file = (if (ctx.name.len > 0) |
| 1298 | // TODO https://github.com/ziglang/zig/issues/5525 |
| 1299 | const copy = if (ctx.name.len > 0) |
| 1299 | 1300 | fs.cwd().openFile(ctx.name, .{ .intended_io_mode = .blocking }) |
| 1300 | 1301 | else |
| 1301 | | 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) { |
| 1302 | 1305 | error.FileNotFound => return error.MissingDebugInfo, |
| 1303 | 1306 | else => return err, |
| 1304 | 1307 | }; |