diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-04-04 18:12:27 +0300 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-04-10 17:34:44 +0300 |
commit | 0bb27f15ec3db37c704b345f67f51c31dd608b06 (patch) | |
tree | 16b4debce2e26a4211ea54b2264189a2792e551c /winsup | |
parent | 0a0565d88173668e256a81a6a3dea337745d8256 (diff) |
Set mcontext.cr2 to the faulting address
* exceptions.cc (call_signal_handler): Set mcontext.cr2 to the
faulting address.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ec70f1a1f..6e71e610c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2015-04-04 Jon TURNEY <jon.turney@dronecode.org.uk> + + * exceptions.cc (call_signal_handler): Set mcontext.cr2 to the + faulting address. + 2015-04-02 Jon TURNEY <jon.turney@dronecode.org.uk> * exceptions.cc (call_signal_handler): Only bother to construct diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 0c9ee1459..4a6c21e7c 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1521,6 +1521,10 @@ _cygtls::call_signal_handler () context.uc_sigmask = context.uc_mcontext.oldmask = this_oldmask; + context.uc_mcontext.cr2 = (thissi.si_signo == SIGSEGV + || thissi.si_signo == SIGBUS) + ? (uintptr_t) thissi.si_addr : 0; + thiscontext = &context; } |