578 |
|
#include <windows.h> |
579 |
|
#include <winerror.h> |
580 |
|
|
581 |
– |
#if defined(_M_IX86) |
581 |
|
#define SIGSEGV_FAULT_HANDLER_ARGLIST EXCEPTION_POINTERS *ExceptionInfo |
582 |
|
#define SIGSEGV_FAULT_HANDLER_ARGS ExceptionInfo |
583 |
|
#define SIGSEGV_FAULT_ADDRESS ExceptionInfo->ExceptionRecord->ExceptionInformation[1] |
584 |
|
#define SIGSEGV_CONTEXT_REGS ExceptionInfo->ContextRecord |
585 |
+ |
#if defined(_M_IX86) |
586 |
|
#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS->Eip |
587 |
|
#define SIGSEGV_REGISTER_FILE ((SIGSEGV_REGISTER_TYPE *)&SIGSEGV_CONTEXT_REGS->Edi) |
588 |
|
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction |
589 |
|
#endif |
590 |
|
#if defined(_M_X64) |
591 |
– |
#define SIGSEGV_FAULT_HANDLER_ARGLIST EXCEPTION_POINTERS *ExceptionInfo |
592 |
– |
#define SIGSEGV_FAULT_HANDLER_ARGS ExceptionInfo |
593 |
– |
#define SIGSEGV_FAULT_ADDRESS ExceptionInfo->ExceptionRecord->ExceptionInformation[1] |
594 |
– |
#define SIGSEGV_CONTEXT_REGS ExceptionInfo->ContextRecord |
591 |
|
#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS->Rip |
592 |
|
#define SIGSEGV_REGISTER_FILE ((SIGSEGV_REGISTER_TYPE *)&SIGSEGV_CONTEXT_REGS->Rax) |
593 |
|
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction |
594 |
|
#endif |
595 |
+ |
#if defined(_M_IA64) |
596 |
+ |
#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS->StIIP |
597 |
+ |
#endif |
598 |
|
#endif |
599 |
|
|
600 |
|
#if HAVE_MACH_EXCEPTIONS |
2983 |
|
{ |
2984 |
|
if (sigsegv_fault_handler != NULL |
2985 |
|
&& ExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION |
2986 |
< |
&& ExceptionInfo->ExceptionRecord->NumberParameters == 2 |
2986 |
> |
&& ExceptionInfo->ExceptionRecord->NumberParameters >= 2 |
2987 |
|
&& handle_badaccess(ExceptionInfo)) |
2988 |
|
return EXCEPTION_CONTINUE_EXECUTION; |
2989 |
|
|