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>
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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; | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user