static gpointer signal_exception_trampoline;
gpointer
-mono_x86_get_signal_exception_trampoline (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
+mono_x86_get_signal_exception_trampoline (MonoTrampInfo **info, gboolean aot);
#ifdef TARGET_WIN32
static void (*restore_stack) (void *);
}
#endif
- mono_handle_native_sigsegv (SIGSEGV, NULL);
+ mono_handle_native_sigsegv (SIGSEGV, NULL, NULL);
return EXCEPTION_CONTINUE_SEARCH;
}
x86_call_code (code, mono_domain_get);
/* get stack overflow exception from domain object */
- x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoDomain, stack_overflow_ex), 4);
+ x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoDomain, stack_overflow_ex), 4);
/* call mono_arch_handle_exception (sctx, stack_overflow_exception_obj) */
x86_push_reg (code, X86_EAX);
/* return */
x86_ret (code);
+ mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
+
return start;
}
g_slist_free (unwind_ops);
}
+ mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
+
return start;
}
g_slist_free (unwind_ops);
}
+ mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
+
g_assert ((code - start) < kMaxCodeSize);
return start;
}
if (mono_object_isinst (exc, mono_defaults.exception_class)) {
MonoException *mono_ex = (MonoException*)exc;
- if (!rethrow)
+ if (!rethrow) {
mono_ex->stack_trace = NULL;
+ mono_ex->trace_ips = NULL;
+ }
}
/* adjust eip so that it point into the call instruction */
g_slist_free (unwind_ops);
}
+ mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
+
return start;
}
* for SEHs to behave. This requires hotfix http://support.microsoft.com/kb/976038
* or (eventually) Windows 7 SP1.
*/
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
DWORD flags;
FARPROC getter;
FARPROC setter;
return TRUE;
}
-
+
if ((ji = mini_jit_info_table_find (domain, (gpointer)(*lmf)->eip, NULL))) {
+ frame->ji = ji;
} else {
- if (!((guint32)((*lmf)->previous_lmf) & 1))
- /* Top LMF entry */
+ if (!(*lmf)->method)
return FALSE;
- g_assert_not_reached ();
- /* Trampoline lmf frame */
frame->method = (*lmf)->method;
}
/* Adjust IP */
new_ctx->eip --;
- frame->ji = ji;
frame->type = FRAME_TYPE_MANAGED_TO_NATIVE;
/* Check if we are in a trampoline LMF frame */
g_slist_free (unwind_ops);
}
+ mono_arch_flush_icache (start, code - start);
+ mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
+
return start;
}
}
void
-mono_arch_handle_altstack_exception (void *sigctx, gpointer fault_addr, gboolean stack_ovf)
+mono_arch_handle_altstack_exception (void *sigctx, MONO_SIG_HANDLER_INFO_TYPE *siginfo, gpointer fault_addr, gboolean stack_ovf)
{
#ifdef MONO_ARCH_USE_SIGACTION
MonoException *exc = NULL;
if (stack_ovf)
exc = mono_domain_get ()->stack_overflow_ex;
if (!ji)
- mono_handle_native_sigsegv (SIGSEGV, sigctx);
+ mono_handle_native_sigsegv (SIGSEGV, sigctx, siginfo);
/* setup a call frame on the real stack so that control is returned there
* and exception handling can continue.
* If this was a stack overflow the caller already ensured the stack pages