Skip to content

Commit

Permalink
Added OpenBSD support to wasmtime's signals.rs (#8613)
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebHeydon authored May 14, 2024
1 parent 7ea9201 commit bcc98fd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/wasmtime/src/runtime/vm/sys/unix/signals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit bcc98fd

Please sign in to comment.