aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/crash_report.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crash_report.zig b/src/crash_report.zig
index 1bc0dd7626..b2e3018de6 100644
--- a/src/crash_report.zig
+++ b/src/crash_report.zig
@@ -238,12 +238,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]),
};
break :ctx StackContext{ .exception = .{ .bp = bp, .ip = ip } };