diff --git a/src/zm_signal.cpp b/src/zm_signal.cpp index b8958da1e..8326756f3 100644 --- a/src/zm_signal.cpp +++ b/src/zm_signal.cpp @@ -62,8 +62,10 @@ RETSIGTYPE zm_die_handler(int signal) ucontext_t *uc = (ucontext_t *) context; cr2 = info->si_addr; #if defined(__x86_64__) - #if defined(__FreeBSD_kernel__) || defined(__FreeBSD__) + #if defined(__FreeBSD_kernel__) || defined(__FreeBSD__) ip = (void *)(uc->uc_mcontext.mc_rip); + #elif defined(__OpenBSD__) + ip = (void *)(uc->sc_rip); #else ip = (void *)(uc->uc_mcontext.gregs[REG_RIP]); #endif