From abd7f3dca3a7e7173b3272963f0337a33c3c701d Mon Sep 17 00:00:00 2001 From: Emil Tomczyk Date: Wed, 30 Aug 2023 17:53:41 +0200 Subject: [PATCH] engine: crashhandler: changed register names for NetBSD x86 (#1414) Probably also needs change for x86_64 --- engine/common/crashhandler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/common/crashhandler.c b/engine/common/crashhandler.c index e806cf0f..f4cb82b1 100644 --- a/engine/common/crashhandler.c +++ b/engine/common/crashhandler.c @@ -388,9 +388,9 @@ static void Sys_Crash( int signal, siginfo_t *si, void *context) bp = (void**)ucontext->uc_mcontext.mc_ebp; sp = (void**)ucontext->uc_mcontext.mc_esp; #elif XASH_NETBSD - pc = (void*)ucontext->uc_mcontext.__gregs[REG_EIP]; - bp = (void**)ucontext->uc_mcontext.__gregs[REG_EBP]; - sp = (void**)ucontext->uc_mcontext.__gregs[REG_ESP]; + pc = (void*)ucontext->uc_mcontext.__gregs[_REG_EIP]; + bp = (void**)ucontext->uc_mcontext.__gregs[_REG_EBP]; + sp = (void**)ucontext->uc_mcontext.__gregs[_REG_ESP]; #elif XASH_OPENBSD pc = (void*)ucontext->sc_eip; bp = (void**)ucontext->sc_ebp;