mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
Changing stuff and seeing what happens
This commit is contained in:
parent
3500b41bfe
commit
b7cd60a354
@ -129,7 +129,7 @@ pub fn dumpStackTraceFromBase(bp: usize, ip: usize) void {
|
||||
return;
|
||||
};
|
||||
const tty_config = detectTTYConfig();
|
||||
printSourceAtAddress(debug_info, stderr, ip, tty_config) catch return;
|
||||
printSourceAtAddress(debug_info, stderr, if (builtin.os == .windows) (ip + 1) else ip, tty_config) catch return;
|
||||
const first_return_address = @intToPtr(*const usize, bp + @sizeOf(usize)).*;
|
||||
printSourceAtAddress(debug_info, stderr, first_return_address - 1, tty_config) catch return;
|
||||
var it = StackIterator{
|
||||
@ -325,6 +325,7 @@ pub const StackIterator = struct {
|
||||
}
|
||||
|
||||
const return_address = @intToPtr(*const usize, self.fp - fp_adjust_factor + @sizeOf(usize)).*;
|
||||
if (return_address == 0) return null;
|
||||
return return_address;
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user