X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fmini-exceptions.c;h=47162f83ee36a845004c5e9dc7e6fd9e49d777ec;hb=382cf74c98b83aabf86b382a35b5817c2dc40179;hp=0f17856c1fc73ebd4c49c5eb5bb3a680ecf47445;hpb=45a6bc149df2618dc0f31c4cce8f56dd5efed7f6;p=mono.git diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c index 0f17856c1fc..47162f83ee3 100644 --- a/mono/mini/mini-exceptions.c +++ b/mono/mini/mini-exceptions.c @@ -12,9 +12,12 @@ #include #include -#include #include +#ifdef HAVE_SIGNAL_H +#include +#endif + #ifdef HAVE_EXECINFO_H #include #endif @@ -54,6 +57,10 @@ #include "debugger-agent.h" #include "seq-points.h" +#ifdef ENABLE_EXTENSION_MODULE +#include "../../../mono-extensions/mono/mini/mini-exceptions.c" +#endif + #ifndef MONO_ARCH_CONTEXT_DEF #define MONO_ARCH_CONTEXT_DEF #endif @@ -547,6 +554,7 @@ get_generic_context_from_stack_frame (MonoJitInfo *ji, gpointer generic_info) static MonoMethod* get_method_from_stack_frame (MonoJitInfo *ji, gpointer generic_info) { + MonoError error; MonoGenericContext context; MonoMethod *method; @@ -556,7 +564,8 @@ get_method_from_stack_frame (MonoJitInfo *ji, gpointer generic_info) method = jinfo_get_method (ji); method = mono_method_get_declaring_generic_method (method); - method = mono_class_inflate_generic_method (method, &context); + method = mono_class_inflate_generic_method_checked (method, &context, &error); + g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */ return method; } @@ -691,7 +700,7 @@ ves_icall_get_trace (MonoException *exc, gint32 skip, MonoBoolean need_file_info } else MONO_OBJECT_SETREF (sf, method, mono_method_get_object (domain, method, NULL)); - sf->method_address = (gint64) ji->code_start; + sf->method_address = (gsize) ji->code_start; sf->native_offset = (char *)ip - (char *)ji->code_start; /* @@ -2091,7 +2100,7 @@ mono_altstack_restore_prot (mgreg_t *regs, guint8 *code, gpointer *tramp_data, g } gboolean -mono_handle_soft_stack_ovf (MonoJitTlsData *jit_tls, MonoJitInfo *ji, void *ctx, guint8* fault_addr) +mono_handle_soft_stack_ovf (MonoJitTlsData *jit_tls, MonoJitInfo *ji, void *ctx, MONO_SIG_HANDLER_INFO_TYPE *siginfo, guint8* fault_addr) { /* we got a stack overflow in the soft-guard pages * There are two cases: @@ -2119,7 +2128,7 @@ mono_handle_soft_stack_ovf (MonoJitTlsData *jit_tls, MonoJitInfo *ji, void *ctx, mono_mprotect ((char*)jit_tls->stack_ovf_guard_base + jit_tls->stack_ovf_guard_size - guard_size, guard_size, MONO_MMAP_READ|MONO_MMAP_WRITE); #ifdef MONO_ARCH_SIGSEGV_ON_ALTSTACK if (ji) { - mono_arch_handle_altstack_exception (ctx, fault_addr, TRUE); + mono_arch_handle_altstack_exception (ctx, siginfo, fault_addr, TRUE); handled = TRUE; } #endif @@ -2263,7 +2272,7 @@ static gboolean handling_sigsegv = FALSE; * information and aborting. */ void -mono_handle_native_sigsegv (int signal, void *ctx) +mono_handle_native_sigsegv (int signal, void *ctx, MONO_SIG_HANDLER_INFO_TYPE *info) { #ifdef MONO_ARCH_USE_SIGACTION struct sigaction sa; @@ -2339,6 +2348,8 @@ mono_handle_native_sigsegv (int signal, void *ctx) } #endif } +#elif defined (ENABLE_EXTENSION_MODULE) + mono_extension_handle_native_sigsegv (ctx, info); #endif /* @@ -2380,7 +2391,7 @@ mono_handle_native_sigsegv (int signal, void *ctx) #else void -mono_handle_native_sigsegv (int signal, void *ctx) +mono_handle_native_sigsegv (int signal, void *ctx, MONO_SIG_HANDLER_INFO_TYPE *info) { g_assert_not_reached (); }