| ... | ... | @@ -59,8 +59,10 @@ const DIFile = struct { |
| 59 | 59 | file_source: *const Module.File, |
| 60 | 60 | ref_count: u32, |
| 61 | 61 | |
| 62 | | fn getFullPath(dif: DIFile, allocator: Allocator) ![]const u8 { |
| 63 | | return dif.file_source.fullPath(allocator); |
| 62 | fn getFullyResolvedPath(dif: DIFile, allocator: Allocator) ![]const u8 { |
| 63 | const path = try dif.file_source.fullPath(allocator); |
| 64 | defer allocator.free(path); |
| 65 | return fs.realpathAlloc(allocator, path); |
| 64 | 66 | } |
| 65 | 67 | }; |
| 66 | 68 | |
| ... | ... | @@ -2358,7 +2360,7 @@ pub fn writeDbgLineHeader(self: *Dwarf, module: *Module) !void { |
| 2358 | 2360 | }); |
| 2359 | 2361 | |
| 2360 | 2362 | for (self.di_files.items) |dif, i| { |
| 2361 | | const full_path = try dif.getFullPath(self.allocator); |
| 2363 | const full_path = try dif.getFullyResolvedPath(self.allocator); |
| 2362 | 2364 | defer self.allocator.free(full_path); |
| 2363 | 2365 | log.debug("adding new file name at {d} of '{s}'", .{ i + 1, full_path }); |
| 2364 | 2366 | di_buf.appendSliceAssumeCapacity(full_path); |