+ MonoContext mctx;
+
+ /*
+ * Handling the exception in the signal handler is problematic, since the original
+ * signal is disabled, and we could run arbitrary code though the debugger. So
+ * resume into the normal stack and do most work there if possible.
+ */
+ MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+
+ /* Pass the ctx parameter in TLS */
+ mono_sigctx_to_monoctx (sigctx, &jit_tls->ex_ctx);
+
+ mctx = jit_tls->ex_ctx;
+ mono_arch_setup_async_callback (&mctx, handle_signal_exception, obj);
+ mono_monoctx_to_sigctx (&mctx, sigctx);
+
+ return TRUE;