diff options
| author | fn ⌃ ⌥ <70830482+FnControlOption@users.noreply.github.com> | 2023-01-22 05:30:38 -0800 |
|---|---|---|
| committer | fn ⌃ ⌥ <70830482+FnControlOption@users.noreply.github.com> | 2023-01-22 05:30:38 -0800 |
| commit | 6089ed9ee77ed034a39c2b557f4608cd8d779d3f (patch) | |
| tree | 9eaf9d78ca73d8c2dc1654e1e8beacbed1551988 /lib/std/debug.zig | |
| parent | be4468be371de34e90a86346b0f6da6f2d85bef4 (diff) | |
| parent | c0284e242f7d78955204dc8a627fecd45aa5e521 (diff) | |
| download | zig-6089ed9ee77ed034a39c2b557f4608cd8d779d3f.tar.gz zig-6089ed9ee77ed034a39c2b557f4608cd8d779d3f.zip | |
Merge branch 'master' into crc
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index f498cb4807..99ddb266b6 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -1986,12 +1986,14 @@ fn handleSegfaultPosix(sig: i32, info: *const os.siginfo_t, ctx_ptr: ?*const any const ip = switch (native_os) { .macos => @intCast(usize, ctx.mcontext.ss.pc), .netbsd => @intCast(usize, ctx.mcontext.gregs[os.REG.PC]), + .freebsd => @intCast(usize, ctx.mcontext.gpregs.elr), else => @intCast(usize, ctx.mcontext.pc), }; // x29 is the ABI-designated frame pointer const bp = switch (native_os) { .macos => @intCast(usize, ctx.mcontext.ss.fp), .netbsd => @intCast(usize, ctx.mcontext.gregs[os.REG.FP]), + .freebsd => @intCast(usize, ctx.mcontext.gpregs.x[os.REG.FP]), else => @intCast(usize, ctx.mcontext.regs[29]), }; dumpStackTraceFromBase(bp, ip); |
