-/*
- * exceptions-x86.c: exception support for x86
+/**
+ * \file
+ * exception support for x86
*
* Authors:
* Dietmar Maurer (dietmar@ximian.com)
}
#endif
- mono_handle_native_sigsegv (SIGSEGV, NULL, NULL);
+ mono_handle_native_crash ("SIGSEGV", NULL, NULL);
return EXCEPTION_CONTINUE_SEARCH;
}
DWORD page_size;
MonoDomain *domain = mono_domain_get ();
MonoJitInfo rji;
- MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+ MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
MonoLMF *lmf = jit_tls->lmf;
MonoContext initial_ctx;
MonoContext ctx;
EXCEPTION_RECORD* er;
CONTEXT* ctx;
LONG res;
- MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+ MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
/* If the thread is not managed by the runtime return early */
if (!jit_tls)
int i, stack_size, stack_offset, arg_offsets [5], regs_offset;
MonoJumpInfo *ji = NULL;
GSList *unwind_ops = NULL;
- guint kMaxCodeSize = 128;
+ guint kMaxCodeSize = 192;
start = code = mono_global_codeman_reserve (kMaxCodeSize);
/**
* mono_arch_get_throw_exception:
- *
- * Returns a function pointer which can be used to raise
+ * \returns a function pointer which can be used to raise
* exceptions. The returned function has the following
* signature: void (*func) (MonoException *exc);
* For example to raise an arithmetic exception you can use:
/**
* mono_arch_get_throw_corlib_exception:
- *
- * Returns a function pointer which can be used to raise
+ * \returns a function pointer which can be used to raise
* corlib exceptions. The returned function has the following
* signature: void (*func) (guint32 ex_token, guint32 offset);
* Here, offset is the offset which needs to be substracted from the caller IP
static void
handle_signal_exception (gpointer obj)
{
- MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+ MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
MonoContext ctx;
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
* 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);
+ MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
/* Pass the ctx parameter in TLS */
mono_sigctx_to_monoctx (ctx, &jit_tls->ex_ctx);
return TRUE;
#elif defined (TARGET_WIN32)
MonoContext mctx;
- MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+ MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
struct sigcontext *ctx = (struct sigcontext *)sigctx;
mono_sigctx_to_monoctx (sigctx, &jit_tls->ex_ctx);
static void
restore_soft_guard_pages (void)
{
- MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+ MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
if (jit_tls->stack_ovf_guard_base)
mono_mprotect (jit_tls->stack_ovf_guard_base, jit_tls->stack_ovf_guard_size, MONO_MMAP_NONE);
}
if (stack_ovf)
exc = mono_domain_get ()->stack_overflow_ex;
if (!ji)
- mono_handle_native_sigsegv (SIGSEGV, sigctx, siginfo);
+ mono_handle_native_crash ("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