diff options
author | Christopher Faylor <me@cgf.cx> | 2005-09-26 13:23:47 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-09-26 13:23:47 +0000 |
commit | f086715060bca513b83f3625b2193466acb1a940 (patch) | |
tree | 003054e15c3e2a60dccdfc0c0a854edf8e22e4eb /winsup | |
parent | 529649f98379650bb4f6d3f9c4770d3993dbd520 (diff) | |
download | newlib-f086715060bca513b83f3625b2193466acb1a940.zip newlib-f086715060bca513b83f3625b2193466acb1a940.tar.gz newlib-f086715060bca513b83f3625b2193466acb1a940.tar.bz2 |
* exceptions.cc (handle_exceptions): Properly fill out si_code.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 27 |
2 files changed, 18 insertions, 13 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e875d8b..4331194 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-09-26 Christopher Faylor <cgf@timesys.com> + + * exceptions.cc (handle_exceptions): Properly fill out si_code. + 2005-09-25 Christopher Faylor <cgf@timesys.com> * sigproc.cc (wait_sig): Cosmetic change. diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index c51dd0b..bc0d31c 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -432,47 +432,47 @@ handle_exceptions (EXCEPTION_RECORD *e0, void *frame, CONTEXT *in0, void *) case STATUS_FLOAT_INVALID_OPERATION: case STATUS_FLOAT_STACK_CHECK: si.si_signo = SIGFPE; - si.si_sigval.sival_int = FPE_FLTSUB; + si.si_code = FPE_FLTSUB; break; case STATUS_FLOAT_INEXACT_RESULT: si.si_signo = SIGFPE; - si.si_sigval.sival_int = FPE_FLTRES; + si.si_code = FPE_FLTRES; break; case STATUS_FLOAT_OVERFLOW: si.si_signo = SIGFPE; - si.si_sigval.sival_int = FPE_FLTOVF; + si.si_code = FPE_FLTOVF; break; case STATUS_FLOAT_UNDERFLOW: si.si_signo = SIGFPE; - si.si_sigval.sival_int = FPE_FLTUND; + si.si_code = FPE_FLTUND; break; case STATUS_INTEGER_DIVIDE_BY_ZERO: si.si_signo = SIGFPE; - si.si_sigval.sival_int = FPE_INTDIV; + si.si_code = FPE_INTDIV; break; case STATUS_INTEGER_OVERFLOW: si.si_signo = SIGFPE; - si.si_sigval.sival_int = FPE_INTOVF; + si.si_code = FPE_INTOVF; break; case STATUS_ILLEGAL_INSTRUCTION: si.si_signo = SIGILL; - si.si_sigval.sival_int = ILL_ILLOPC; + si.si_code = ILL_ILLOPC; break; case STATUS_PRIVILEGED_INSTRUCTION: si.si_signo = SIGILL; - si.si_sigval.sival_int = ILL_PRVOPC; + si.si_code = ILL_PRVOPC; break; case STATUS_NONCONTINUABLE_EXCEPTION: si.si_signo = SIGILL; - si.si_sigval.sival_int = ILL_ILLADR; + si.si_code = ILL_ILLADR; break; case STATUS_TIMEOUT: si.si_signo = SIGALRM; - si.si_sigval.sival_int = 0; + si.si_code = 0; break; case STATUS_ACCESS_VIOLATION: @@ -484,12 +484,12 @@ handle_exceptions (EXCEPTION_RECORD *e0, void *frame, CONTEXT *in0, void *) case STATUS_INVALID_DISPOSITION: case STATUS_STACK_OVERFLOW: si.si_signo = SIGSEGV; - si.si_sigval.sival_int = SEGV_MAPERR; + si.si_code = SEGV_MAPERR; break; case STATUS_CONTROL_C_EXIT: si.si_signo = SIGINT; - si.si_sigval.sival_int = 0; + si.si_code = 0; break; case STATUS_INVALID_HANDLE: @@ -569,7 +569,8 @@ handle_exceptions (EXCEPTION_RECORD *e0, void *frame, CONTEXT *in0, void *) me.return_from_fault (); si.si_addr = ebp; - si.si_code = SI_KERNEL; + if (!si_code) + si.si_code = SI_KERNEL; si.si_errno = si.si_pid = si.si_uid = 0; me.push ((__stack_t) ebp, true); sig_send (NULL, si, &me); // Signal myself |