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.53 by gbeauche, 2005-02-20T11:39:12Z vs.
Revision 1.54 by gbeauche, 2005-03-23T21:37:24Z

# Line 256 | Line 256 | static void powerpc_decode_instruction(i
256   #define SIGSEGV_REGISTER_FILE                   ((unsigned long *)SIGSEGV_CONTEXT_REGS), SIGSEGV_SPARC_GWINDOWS, SIGSEGV_SPARC_RWINDOW
257   #define SIGSEGV_SKIP_INSTRUCTION                sparc_skip_instruction
258   #endif
259 + #if defined(__i386__)
260 + #include <sys/regset.h>
261 + #define SIGSEGV_CONTEXT_REGS                    (((ucontext_t *)scp)->uc_mcontext.gregs)
262 + #define SIGSEGV_FAULT_INSTRUCTION               SIGSEGV_CONTEXT_REGS[EIP]
263 + #define SIGSEGV_REGISTER_FILE                   (unsigned long *)SIGSEGV_CONTEXT_REGS
264 + #define SIGSEGV_SKIP_INSTRUCTION                ix86_skip_instruction
265 + #endif
266   #endif
267   #if defined(__FreeBSD__)
268   #if (defined(i386) || defined(__i386__))
# Line 730 | Line 737 | enum {
737   #endif
738   };
739   #endif
740 + #if defined(__sun__)
741 + // Same as for Linux, need to check for x86-64
742 + enum {
743 + #if defined(__i386__)
744 +        X86_REG_EIP = EIP,
745 +        X86_REG_EAX = EAX,
746 +        X86_REG_ECX = ECX,
747 +        X86_REG_EDX = EDX,
748 +        X86_REG_EBX = EBX,
749 +        X86_REG_ESP = ESP,
750 +        X86_REG_EBP = EBP,
751 +        X86_REG_ESI = ESI,
752 +        X86_REG_EDI = EDI
753 + #endif
754 + };
755 + #endif
756   #if defined(_WIN32)
757   enum {
758   #if (defined(i386) || defined(__i386__))
# Line 2125 | Line 2148 | int main(void)
2148          if (vm_init() < 0)
2149                  return 1;
2150  
2151 < #ifdef _WIN32
2129 <        page_size = 4096;
2130 < #else
2131 <        page_size = getpagesize();
2132 < #endif
2151 >        page_size = vm_get_page_size();
2152          if ((page = (char *)vm_acquire(page_size)) == VM_MAP_FAILED)
2153                  return 2;
2154          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines