Updated context definitions for the latest Darwin/x86.

This commit is contained in:
Ken Thomases 2005-11-15 18:15:56 +00:00 committed by Alexandre Julliard
parent e87fe3a17f
commit a63acd71c8
1 changed files with 19 additions and 19 deletions

View File

@ -298,29 +298,32 @@ typedef struct
typedef ucontext_t SIGCONTEXT;
#define EAX_sig(context) ((context)->uc_mcontext->sc.sc_eax)
#define EBX_sig(context) ((context)->uc_mcontext->sc.sc_ebx)
#define ECX_sig(context) ((context)->uc_mcontext->sc.sc_ecx)
#define EDX_sig(context) ((context)->uc_mcontext->sc.sc_edx)
#define ESI_sig(context) ((context)->uc_mcontext->sc.sc_esi)
#define EDI_sig(context) ((context)->uc_mcontext->sc.sc_edi)
#define EBP_sig(context) ((context)->uc_mcontext->sc.sc_ebp)
#define EAX_sig(context) ((context)->uc_mcontext->ss.eax)
#define EBX_sig(context) ((context)->uc_mcontext->ss.ebx)
#define ECX_sig(context) ((context)->uc_mcontext->ss.ecx)
#define EDX_sig(context) ((context)->uc_mcontext->ss.edx)
#define ESI_sig(context) ((context)->uc_mcontext->ss.esi)
#define EDI_sig(context) ((context)->uc_mcontext->ss.edi)
#define EBP_sig(context) ((context)->uc_mcontext->ss.ebp)
#define CS_sig(context) ((context)->uc_mcontext->sc.sc_cs)
#define DS_sig(context) ((context)->uc_mcontext->sc.sc_ds)
#define ES_sig(context) ((context)->uc_mcontext->sc.sc_es)
#define FS_sig(context) ((context)->uc_mcontext->sc.sc_fs)
#define GS_sig(context) ((context)->uc_mcontext->sc.sc_gs)
#define SS_sig(context) ((context)->uc_mcontext->sc.sc_ss)
#define CS_sig(context) ((context)->uc_mcontext->ss.cs)
#define DS_sig(context) ((context)->uc_mcontext->ss.ds)
#define ES_sig(context) ((context)->uc_mcontext->ss.es)
#define FS_sig(context) ((context)->uc_mcontext->ss.fs)
#define GS_sig(context) ((context)->uc_mcontext->ss.gs)
#define SS_sig(context) ((context)->uc_mcontext->ss.ss)
#define EFL_sig(context) ((context)->uc_mcontext->sc.sc_eflags)
#define EFL_sig(context) ((context)->uc_mcontext->ss.eflags)
#define EIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->sc.sc_eip))
#define ESP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->sc.sc_esp))
#define EIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->ss.eip))
#define ESP_sig(context) (*((unsigned long*)&(context)->uc_mcontext->ss.esp))
#define HANDLER_DEF(name) void name( int __signal, siginfo_t *__siginfo, SIGCONTEXT *__context )
#define HANDLER_CONTEXT (__context)
#define TRAP_sig(context) ((context)->uc_mcontext->es.trapno)
#define ERROR_sig(context) ((context)->uc_mcontext->es.err)
#define FAULT_ADDRESS (__siginfo->si_addr)
#endif /* __APPLE__ */
@ -1300,9 +1303,6 @@ BOOL SIGNAL_Init(void)
ss.ss_sp = get_signal_stack();
ss.ss_size = signal_stack_size;
ss.ss_flags = 0;
#ifdef __APPLE__ /* work around MacOS bug */
ss.ss_sp = (char *)ss.ss_sp + ss.ss_size;
#endif
if (!sigaltstack(&ss, NULL)) have_sigaltstack = 1;
#ifdef linux
/* sigaltstack may fail because the kernel is too old, or