ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/sigsegv.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/sigsegv.cpp (file contents):
Revision 1.18 by gbeauche, 2002-05-20T18:12:01Z vs.
Revision 1.21 by gbeauche, 2002-10-03T15:49:14Z

# Line 215 | Line 215 | static void powerpc_decode_instruction(i
215   #endif
216   #define SIGSEGV_FAULT_HANDLER_ARGLIST   int sig, siginfo_t *sip, void *scp
217   #define SIGSEGV_FAULT_ADDRESS                   sip->si_addr
218 + #if defined(__NetBSD__) || defined(__FreeBSD__)
219   #if (defined(i386) || defined(__i386__))
220   #define SIGSEGV_FAULT_INSTRUCTION               (((struct sigcontext *)scp)->sc_eip)
221   #define SIGSEGV_REGISTER_FILE                   ((unsigned int *)&(((struct sigcontext *)scp)->sc_edi)) /* EDI is the first GPR (even below EIP) in sigcontext */
221 /* (gb) Disable because this would hang configure script for some reason
222 * though standalone testing gets it right. Any idea why?
222   #define SIGSEGV_SKIP_INSTRUCTION                ix86_skip_instruction
223 < */
223 > #endif
224   #endif
225   #if defined(__linux__)
226   #if (defined(i386) || defined(__i386__))
# Line 231 | Line 230 | static void powerpc_decode_instruction(i
230   #define SIGSEGV_REGISTER_FILE                   (unsigned int *)SIGSEGV_CONTEXT_REGS
231   #define SIGSEGV_SKIP_INSTRUCTION                ix86_skip_instruction
232   #endif
233 + #if (defined(x86_64) || defined(__x86_64__))
234 + #include <sys/ucontext.h>
235 + #define SIGSEGV_CONTEXT_REGS                    (((ucontext_t *)scp)->uc_mcontext.gregs)
236 + #define SIGSEGV_FAULT_INSTRUCTION               SIGSEGV_CONTEXT_REGS[16] /* should use REG_RIP instead */
237 + #define SIGSEGV_REGISTER_FILE                   (unsigned long *)SIGSEGV_CONTEXT_REGS
238 + #endif
239   #if (defined(ia64) || defined(__ia64__))
240   #define SIGSEGV_FAULT_INSTRUCTION               (((struct sigcontext *)scp)->sc_ip & ~0x3ULL) /* slot number is in bits 0 and 1 */
241   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines