| ... | ... | @@ -686,7 +686,21 @@ pub const Module = switch (native_os) { |
| 686 | 686 | }; |
| 687 | 687 | |
| 688 | 688 | // Check if its debug infos are already in the cache |
| 689 | | const o_file_path = mem.sliceTo(self.strings[symbol.ofile..], 0); |
| 689 | const o_file_path = path: { |
| 690 | const raw_path = mem.sliceTo(self.strings[symbol.ofile..], 0); |
| 691 | |
| 692 | if (!std.mem.endsWith(u8, raw_path, ")")) break :path raw_path; |
| 693 | |
| 694 | const last_paren_index = std.mem.lastIndexOfScalar(u8, raw_path, '(') orelse break :path raw_path; |
| 695 | |
| 696 | const basename = raw_path[last_paren_index + 1 .. raw_path.len - 1]; |
| 697 | |
| 698 | const path = raw_path[0..last_paren_index]; |
| 699 | const dirname = std.fs.path.dirname(path) orelse break :path basename; |
| 700 | |
| 701 | break :path try std.fs.path.resolve(allocator, &.{ dirname, basename }); |
| 702 | }; |
| 703 | |
| 690 | 704 | const o_file_info = self.ofiles.getPtr(o_file_path) orelse |
| 691 | 705 | (self.loadOFile(allocator, o_file_path) catch |err| switch (err) { |
| 692 | 706 | error.FileNotFound, |