From e3f0b840cc3788fd9e7bfb235f9d390c667fc6bf Mon Sep 17 00:00:00 2001 From: Caleb Heydon Date: Mon, 13 May 2024 19:25:16 -0400 Subject: [PATCH] Added OpenBSD support to wasmtime's signals.rs --- crates/wasmtime/src/runtime/vm/sys/unix/signals.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/signals.rs b/crates/wasmtime/src/runtime/vm/sys/unix/signals.rs index 520fc673a9b0..179eea2beaa0 100644 --- a/crates/wasmtime/src/runtime/vm/sys/unix/signals.rs +++ b/crates/wasmtime/src/runtime/vm/sys/unix/signals.rs @@ -255,6 +255,12 @@ unsafe fn get_pc_and_fp(cx: *mut libc::c_void, _signum: libc::c_int) -> (*const cx.mc_gpregs.gp_elr as *const u8, cx.mc_gpregs.gp_x[29] as usize, ) + } else if #[cfg(all(target_os = "openbsd", target_arch = "x86_64"))] { + let cx = &*(cx as *const libc::ucontext_t); + ( + cx.sc_rip as *const u8, + cx.sc_rbp as usize, + ) } else { compile_error!("unsupported platform");