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.35 by gbeauche, 2003-11-10T23:54:31Z vs.
Revision 1.37 by gbeauche, 2003-12-20T07:43:56Z

# Line 222 | Line 222 | static void powerpc_decode_instruction(i
222   #define SIGSEGV_FAULT_HANDLER_ARGLIST_1 siginfo_t *sip, void *scp
223   #define SIGSEGV_FAULT_HANDLER_ARGS              sip, scp
224   #define SIGSEGV_FAULT_ADDRESS                   sip->si_addr
225 + #if (defined(sgi) || defined(__sgi))
226 + #include <ucontext.h>
227 + #define SIGSEGV_CONTEXT_REGS                    (((ucontext_t *)scp)->uc_mcontext.gregs)
228 + #define SIGSEGV_FAULT_INSTRUCTION               (unsigned long)SIGSEGV_CONTEXT_REGS[CTX_EPC]
229 + #endif
230   #if defined(__sun__)
231   #if (defined(sparc) || defined(__sparc__))
232   #include <sys/ucontext.h>
# Line 303 | Line 308 | static void powerpc_decode_instruction(i
308   #endif
309  
310   // Irix 5 or 6 on MIPS
311 < #if (defined(sgi) || defined(__sgi)) && (defined(SYSTYPE_SVR4) || defined(__SYSTYPE_SVR4))
311 > #if (defined(sgi) || defined(__sgi)) && (defined(SYSTYPE_SVR4) || defined(_SYSTYPE_SVR4))
312   #include <ucontext.h>
313   #define SIGSEGV_FAULT_HANDLER_ARGLIST   int sig, int code, struct sigcontext *scp
314   #define SIGSEGV_FAULT_HANDLER_ARGS              sig, code, scp
315 < #define SIGSEGV_FAULT_ADDRESS                   scp->sc_badvaddr
315 > #define SIGSEGV_FAULT_ADDRESS                   (unsigned long)scp->sc_badvaddr
316 > #define SIGSEGV_FAULT_INSTRUCTION               (unsigned long)scp->sc_pc
317   #define SIGSEGV_ALL_SIGNALS                             FAULT_HANDLER(SIGSEGV)
318   #endif
319  
# Line 813 | Line 819 | static bool ix86_skip_instruction(unsign
819                  int rloc = x86_reg_map[reg];
820                  switch (transfer_size) {
821                  case SIZE_BYTE:
822 <                        if (!has_rex && reg >= 4)
823 <                                regs[rloc - 4] = (regs[rloc - 4] & ~0xff00L);
824 <                        else
825 <                                regs[rloc] = (regs[rloc] & ~0xffL);
822 >                        if (has_rex || reg < 4)
823 >                                regs[rloc] = (regs[rloc] & ~0x00ffL);
824 >                        else {
825 >                                rloc = x86_reg_map[reg - 4];
826 >                                regs[rloc] = (regs[rloc] & ~0xff00L);
827 >                        }
828                          break;
829                  case SIZE_WORD:
830                          regs[rloc] = (regs[rloc] & ~0xffffL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines