aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorStephen Gregoratto <dev@sgregoratto.me>2023-01-19 00:55:51 +1100
committerVeikka Tuominen <git@vexu.eu>2023-01-21 23:20:50 +0200
commit7f635ae7bdf63da19d09763c7fdbdc61fa035282 (patch)
tree02bdc2a4af9b840364b15b3eb1fd89913e45d3d4 /lib/std/debug.zig
parent38eebf3c4d68239e1d29118234a3165355a3a5fc (diff)
downloadzig-7f635ae7bdf63da19d09763c7fdbdc61fa035282.tar.gz
zig-7f635ae7bdf63da19d09763c7fdbdc61fa035282.zip
FreeBSD: add mcontext_t for aarch64
What isn't disabled for test-std mostly passes, except for the copysign and signbit tests for f16. Seemingly related to #14366.
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig2
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);