| ... | @@ -129,7 +129,7 @@ pub fn dumpStackTraceFromBase(bp: usize, ip: usize) void { | ... | @@ -129,7 +129,7 @@ pub fn dumpStackTraceFromBase(bp: usize, ip: usize) void { |
| 129 | return; | 129 | return; |
| 130 | }; | 130 | }; |
| 131 | const tty_config = detectTTYConfig(); | 131 | const tty_config = detectTTYConfig(); |
| 132 | printSourceAtAddress(debug_info, stderr, if (builtin.os == .windows) (ip + 1) else ip, tty_config) catch return; | 132 | printSourceAtAddress(debug_info, stderr, ip, tty_config) catch return; |
| 133 | const first_return_address = @intToPtr(*const usize, bp + @sizeOf(usize)).*; | 133 | const first_return_address = @intToPtr(*const usize, bp + @sizeOf(usize)).*; |
| 134 | printSourceAtAddress(debug_info, stderr, first_return_address - 1, tty_config) catch return; | 134 | printSourceAtAddress(debug_info, stderr, first_return_address - 1, tty_config) catch return; |
| 135 | var it = StackIterator{ | 135 | var it = StackIterator{ |
| ... | @@ -471,7 +471,7 @@ fn printSourceAtAddressWindows( | ... | @@ -471,7 +471,7 @@ fn printSourceAtAddressWindows( |
| 471 | line_index += @sizeOf(pdb.LineNumberEntry); | 471 | line_index += @sizeOf(pdb.LineNumberEntry); |
| 472 | | 472 | |
| 473 | const vaddr_start = frag_vaddr_start + line_num_entry.Offset; | 473 | const vaddr_start = frag_vaddr_start + line_num_entry.Offset; |
| 474 | if (relative_address <= vaddr_start) { | 474 | if (relative_address < vaddr_start) { |
| 475 | break; | 475 | break; |
| 476 | } | 476 | } |
| 477 | } | 477 | } |