From 7f635ae7bdf63da19d09763c7fdbdc61fa035282 Mon Sep 17 00:00:00 2001 From: Stephen Gregoratto Date: Thu, 19 Jan 2023 00:55:51 +1100 Subject: 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. --- lib/std/debug.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/std/debug.zig') 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); -- cgit v1.2.3