diff options
author | joerg <joerg@pkgsrc.org> | 2015-02-28 23:43:32 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-02-28 23:43:32 +0000 |
commit | 4161e6af80f0100c7beb7180f71f73963572a9da (patch) | |
tree | 96f905e269a691649753c38eeb9462504f9ec5b3 /emulators/BasiliskII | |
parent | f8a78f2b0c7603f2f1181df6943f40ebf58a3f98 (diff) | |
download | pkgsrc-4161e6af80f0100c7beb7180f71f73963572a9da.tar.gz |
Fix segfault handling on ARM to fix segfault handling on ARM.
Diffstat (limited to 'emulators/BasiliskII')
-rw-r--r-- | emulators/BasiliskII/distinfo | 4 | ||||
-rw-r--r-- | emulators/BasiliskII/patches/patch-ag | 30 |
2 files changed, 29 insertions, 5 deletions
diff --git a/emulators/BasiliskII/distinfo b/emulators/BasiliskII/distinfo index 805aae541bd..1028440373f 100644 --- a/emulators/BasiliskII/distinfo +++ b/emulators/BasiliskII/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.17 2012/05/14 07:35:02 dholland Exp $ +$NetBSD: distinfo,v 1.18 2015/02/28 23:43:32 joerg Exp $ SHA1 (BasiliskII_src_01052006.tar.bz2) = 6373b33adf6caec53c5d1ed46a00adcac89ad3bb RMD160 (BasiliskII_src_01052006.tar.bz2) = bb1a061c504bd7d28b869e0eec2806cf8a79cf8d @@ -9,7 +9,7 @@ SHA1 (patch-ac) = ac4d313a8c60a807a5ea563dcca995e092be9c15 SHA1 (patch-ad) = 6a215532e891848fe449ef5fe4307793c34bb9d6 SHA1 (patch-ae) = dcac9287614535fa72fe9c8b0e3c516575e40887 SHA1 (patch-af) = 285b46cc6e1b761e12498603579424b4f49689c1 -SHA1 (patch-ag) = 081471cf25f0b11a9ef449e48fd7ce8ea3367f0d +SHA1 (patch-ag) = 962620071eec777d22c49a35795b819432aa8974 SHA1 (patch-ah) = 0f67eed6f59e6c381c1a6fbeb98261cad4697760 SHA1 (patch-ai) = fc527be478576f157bffbd6a91eb1bdc85903fb1 SHA1 (patch-aj) = c331aa7080b330cf58f58c72456b91b0e5a2156f diff --git a/emulators/BasiliskII/patches/patch-ag b/emulators/BasiliskII/patches/patch-ag index cdc1294214b..d2e3e466e85 100644 --- a/emulators/BasiliskII/patches/patch-ag +++ b/emulators/BasiliskII/patches/patch-ag @@ -1,4 +1,4 @@ -$NetBSD: patch-ag,v 1.4 2007/06/12 12:51:08 joerg Exp $ +$NetBSD: patch-ag,v 1.5 2015/02/28 23:43:32 joerg Exp $ --- src/Unix/sigsegv.cpp.orig 2006-03-30 22:45:49.000000000 +0000 +++ src/Unix/sigsegv.cpp @@ -20,7 +20,21 @@ $NetBSD: patch-ag,v 1.4 2007/06/12 12:51:08 joerg Exp $ #if (defined(i386) || defined(__i386__)) #define SIGSEGV_FAULT_INSTRUCTION (((struct sigcontext *)scp)->sc_eip) #define SIGSEGV_REGISTER_FILE ((unsigned long *)&(((struct sigcontext *)scp)->sc_edi)) /* EDI is the first GPR (even below EIP) in sigcontext */ -@@ -451,7 +451,7 @@ static sigsegv_address_t get_fault_addre +@@ -286,6 +286,13 @@ static void powerpc_decode_instruction(i + #define SIGSEGV_REGISTER_FILE (unsigned long *)&SIGSEGV_CONTEXT_REGS[_REG_PC], (unsigned long *)&SIGSEGV_CONTEXT_REGS[_REG_R0] + #define SIGSEGV_SKIP_INSTRUCTION powerpc_skip_instruction + #endif ++#if (defined(arm) || defined(__arm__)) ++#include <sys/ucontext.h> ++#define SIGSEGV_CONTEXT_REGS (((ucontext_t *)scp)->uc_mcontext.__gregs) ++#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS[_REG_PC] ++#define SIGSEGV_REGISTER_FILE (unsigned long *)SIGSEGV_CONTEXT_REGS ++#define SIGSEGV_SKIP_INSTRUCTION arm_skip_instruction ++#endif + #endif + #if defined(__linux__) + #if (defined(i386) || defined(__i386__)) +@@ -451,7 +458,7 @@ static sigsegv_address_t get_fault_addre #define SIGSEGV_ALL_SIGNALS FAULT_HANDLER(SIGSEGV) #endif #endif @@ -29,7 +43,7 @@ $NetBSD: patch-ag,v 1.4 2007/06/12 12:51:08 joerg Exp $ #if (defined(i386) || defined(__i386__)) #define SIGSEGV_ALL_SIGNALS FAULT_HANDLER(SIGBUS) #define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, int code, struct sigcontext *scp, char *addr -@@ -721,10 +721,14 @@ enum { +@@ -721,10 +728,14 @@ enum { #endif }; #endif @@ -45,3 +59,13 @@ $NetBSD: patch-ag,v 1.4 2007/06/12 12:51:08 joerg Exp $ X86_REG_EAX = 7, X86_REG_ECX = 6, X86_REG_EDX = 5, +@@ -1450,6 +1461,9 @@ enum { + #if (defined(__linux__)) + ARM_REG_PC = 15, + ARM_REG_CPSR = 16 ++#elif defined(__NetBSD__) ++ ARM_REG_PC = _REG_PC, ++ ARM_REG_CPSR = _REG_CPSR + #endif + }; + static bool arm_skip_instruction(unsigned long * regs) |