diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-04-04 16:12:27 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-04-23 21:58:33 +0200 |
commit | bccc0e83e82af2e74e4a813bf551cad0b2305814 (patch) | |
tree | 16d0489fb9367431a829e09ccc63a4863c87d60b /winsup/cygwin/exceptions.cc | |
parent | 9043956ce8594855ae5cfe66e8334e51c6969f59 (diff) | |
download | cygnal-bccc0e83e82af2e74e4a813bf551cad0b2305814.tar.gz cygnal-bccc0e83e82af2e74e4a813bf551cad0b2305814.tar.bz2 cygnal-bccc0e83e82af2e74e4a813bf551cad0b2305814.zip |
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/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |