authorgravatar for 35231115+Rocknest@users.noreply.github.comRocknest <35231115+Rocknest@users.noreply.github.com> 2020-02-01 13:15:49+02:00
committergravatar for 35231115+Rocknest@users.noreply.github.comRocknest <35231115+Rocknest@users.noreply.github.com> 2020-02-05 17:19:00+02:00
logf30feab1b90fe7fa9c9d05acb18d404a3baf717f
tree485c73232176fe6c3a099b85046e8a0770cc6041
parenta56183197dcdab0bfb97489c8a8c22443302b62d

Link the issue in doc comment


1 files changed, 7 insertions(+), 0 deletions(-)

lib/std/debug.zig+7
......@@ -378,6 +378,7 @@ pub fn printSourceAtAddress(debug_info: *DebugInfo, out_stream: var, address: us
378378 return noasync printSourceAtAddressPosix(debug_info, out_stream, address, tty_config);
379379}
380380
381/// TODO resources https://github.com/ziglang/zig/issues/4353
381382fn printSourceAtAddressWindows(
382383 di: *DebugInfo,
383384 out_stream: var,
......@@ -604,6 +605,7 @@ pub const TTY = struct {
604605 };
605606};
606607
608/// TODO resources https://github.com/ziglang/zig/issues/4353
607609fn populateModule(di: *DebugInfo, mod: *Module) !void {
608610 if (mod.populated)
609611 return;
......@@ -755,6 +757,7 @@ pub const OpenSelfDebugInfoError = error{
755757 UnsupportedOperatingSystem,
756758};
757759
760/// TODO resources https://github.com/ziglang/zig/issues/4353
758761/// TODO once https://github.com/ziglang/zig/issues/3157 is fully implemented,
759762/// make this `noasync fn` and remove the individual noasync calls.
760763pub fn openSelfDebugInfo(allocator: *mem.Allocator) !DebugInfo {
......@@ -963,6 +966,7 @@ pub fn openDwarfDebugInfo(di: *DwarfInfo, allocator: *mem.Allocator) !void {
963966 try di.scanAllCompileUnits();
964967}
965968
969/// TODO resources https://github.com/ziglang/zig/issues/4353
966970pub fn openElfDebugInfo(
967971 allocator: *mem.Allocator,
968972 data: []u8,
......@@ -1001,6 +1005,7 @@ pub fn openElfDebugInfo(
10011005 return di;
10021006}
10031007
1008/// TODO resources https://github.com/ziglang/zig/issues/4353
10041009fn openSelfDebugInfoPosix(allocator: *mem.Allocator) !DwarfInfo {
10051010 var exe_file = try fs.openSelfExe();
10061011 errdefer exe_file.close();
......@@ -1020,6 +1025,7 @@ fn openSelfDebugInfoPosix(allocator: *mem.Allocator) !DwarfInfo {
10201025 return openElfDebugInfo(allocator, exe_mmap);
10211026}
10221027
1028/// TODO resources https://github.com/ziglang/zig/issues/4353
10231029fn openSelfDebugInfoMacOs(allocator: *mem.Allocator) !DebugInfo {
10241030 const hdr = &std.c._mh_execute_header;
10251031 assert(hdr.magic == std.macho.MH_MAGIC_64);
......@@ -2072,6 +2078,7 @@ fn getAbbrevTableEntry(abbrev_table: *const AbbrevTable, abbrev_code: u64) ?*con
20722078 return null;
20732079}
20742080
2081/// TODO resources https://github.com/ziglang/zig/issues/4353
20752082fn getLineNumberInfoMacOs(di: *DebugInfo, symbol: MachoSymbol, address: usize) !LineInfo {
20762083 const ofile = symbol.ofile orelse return error.MissingDebugInfo;
20772084 const gop = try di.ofiles.getOrPut(ofile);