* exceptions.cc (call_signal_handler): Set mcontext.cr2 to the
faulting address.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+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
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;
}