commit 6ed30064d3fb509769debe57382bb689323dc65b (tree)
parent 7c2efe50005a5e5b17e3bffbe50dbd320de3f87a
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Tue, 26 May 2026 14:58:48 +0200
std.debug.cpu_context: add mcontext_t for riscv32-netbsd and riscv64-netbsd
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/lib/std/debug/cpu_context.zig b/lib/std/debug/cpu_context.zig
@@ -2602,6 +2602,16 @@ const signal_ucontext_t = switch (native_os) {
lr: u32,
pc: u32,
},
+ // https://github.com/NetBSD/src/blob/861008c62187bf7bc0aac4d81e52ed6eee4d0c74/sys/arch/riscv/include/mcontext.h
+ .riscv32, .riscv64 => extern struct {
+ ra_sp_gp_tp: [4]usize align(8),
+ t0_2: [3]usize,
+ s0_1: [2]usize,
+ a: [8]usize,
+ s2_11: [10]usize,
+ t3_6: [4]usize,
+ pc: usize,
+ },
// https://github.com/NetBSD/src/blob/861008c62187bf7bc0aac4d81e52ed6eee4d0c74/sys/arch/sparc/include/mcontext.h
.sparc => @compileError("sparc-netbsd mcontext_t missing"),
.sparc64 => @compileError("sparc64-netbsd mcontext_t missing"),