| ... | ... | @@ -378,6 +378,7 @@ pub fn printSourceAtAddress(debug_info: *DebugInfo, out_stream: var, address: us |
| 378 | 378 | return noasync printSourceAtAddressPosix(debug_info, out_stream, address, tty_config); |
| 379 | 379 | } |
| 380 | 380 | |
| 381 | /// TODO resources https://github.com/ziglang/zig/issues/4353 |
| 381 | 382 | fn printSourceAtAddressWindows( |
| 382 | 383 | di: *DebugInfo, |
| 383 | 384 | out_stream: var, |
| ... | ... | @@ -604,6 +605,7 @@ pub const TTY = struct { |
| 604 | 605 | }; |
| 605 | 606 | }; |
| 606 | 607 | |
| 608 | /// TODO resources https://github.com/ziglang/zig/issues/4353 |
| 607 | 609 | fn populateModule(di: *DebugInfo, mod: *Module) !void { |
| 608 | 610 | if (mod.populated) |
| 609 | 611 | return; |
| ... | ... | @@ -755,6 +757,7 @@ pub const OpenSelfDebugInfoError = error{ |
| 755 | 757 | UnsupportedOperatingSystem, |
| 756 | 758 | }; |
| 757 | 759 | |
| 760 | /// TODO resources https://github.com/ziglang/zig/issues/4353 |
| 758 | 761 | /// TODO once https://github.com/ziglang/zig/issues/3157 is fully implemented, |
| 759 | 762 | /// make this `noasync fn` and remove the individual noasync calls. |
| 760 | 763 | pub fn openSelfDebugInfo(allocator: *mem.Allocator) !DebugInfo { |
| ... | ... | @@ -963,6 +966,7 @@ pub fn openDwarfDebugInfo(di: *DwarfInfo, allocator: *mem.Allocator) !void { |
| 963 | 966 | try di.scanAllCompileUnits(); |
| 964 | 967 | } |
| 965 | 968 | |
| 969 | /// TODO resources https://github.com/ziglang/zig/issues/4353 |
| 966 | 970 | pub fn openElfDebugInfo( |
| 967 | 971 | allocator: *mem.Allocator, |
| 968 | 972 | data: []u8, |
| ... | ... | @@ -997,12 +1001,11 @@ pub fn openElfDebugInfo( |
| 997 | 1001 | null, |
| 998 | 1002 | }; |
| 999 | 1003 | |
| 1000 | | efile.close(); |
| 1001 | | |
| 1002 | 1004 | try openDwarfDebugInfo(&di, allocator); |
| 1003 | 1005 | return di; |
| 1004 | 1006 | } |
| 1005 | 1007 | |
| 1008 | /// TODO resources https://github.com/ziglang/zig/issues/4353 |
| 1006 | 1009 | fn openSelfDebugInfoPosix(allocator: *mem.Allocator) !DwarfInfo { |
| 1007 | 1010 | var exe_file = try fs.openSelfExe(); |
| 1008 | 1011 | errdefer exe_file.close(); |
| ... | ... | @@ -1022,6 +1025,7 @@ fn openSelfDebugInfoPosix(allocator: *mem.Allocator) !DwarfInfo { |
| 1022 | 1025 | return openElfDebugInfo(allocator, exe_mmap); |
| 1023 | 1026 | } |
| 1024 | 1027 | |
| 1028 | /// TODO resources https://github.com/ziglang/zig/issues/4353 |
| 1025 | 1029 | fn openSelfDebugInfoMacOs(allocator: *mem.Allocator) !DebugInfo { |
| 1026 | 1030 | const hdr = &std.c._mh_execute_header; |
| 1027 | 1031 | assert(hdr.magic == std.macho.MH_MAGIC_64); |
| ... | ... | @@ -2074,6 +2078,7 @@ fn getAbbrevTableEntry(abbrev_table: *const AbbrevTable, abbrev_code: u64) ?*con |
| 2074 | 2078 | return null; |
| 2075 | 2079 | } |
| 2076 | 2080 | |
| 2081 | /// TODO resources https://github.com/ziglang/zig/issues/4353 |
| 2077 | 2082 | fn getLineNumberInfoMacOs(di: *DebugInfo, symbol: MachoSymbol, address: usize) !LineInfo { |
| 2078 | 2083 | const ofile = symbol.ofile orelse return error.MissingDebugInfo; |
| 2079 | 2084 | const gop = try di.ofiles.getOrPut(ofile); |