X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fexceptions-sparc.c;h=f7010b13f88e4873928d655ee63ddb576e9a7b28;hb=3d47b20c62870f60d6944078b2a9cff7565c3205;hp=52a93ac1f13f925b20c3bb1961fe255c2e8071b3;hpb=738acc78f12e75c570880337022ddc7492e82f96;p=mono.git diff --git a/mono/mini/exceptions-sparc.c b/mono/mini/exceptions-sparc.c index 52a93ac1f13..f7010b13f88 100644 --- a/mono/mini/exceptions-sparc.c +++ b/mono/mini/exceptions-sparc.c @@ -1,5 +1,6 @@ -/* - * exceptions-sparc.c: exception support for sparc +/** + * \file + * exception support for sparc * * Authors: * Mark Crichton (crichton@gimp.org) @@ -21,7 +22,7 @@ #include #include #include -#include +#include #include #include "mini.h" @@ -166,6 +167,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) static void throw_exception (MonoObject *exc, gpointer sp, gpointer ip, gboolean rethrow) { + MonoError error; MonoContext ctx; static void (*restore_context) (MonoContext *); gpointer *window; @@ -178,13 +180,14 @@ throw_exception (MonoObject *exc, gpointer sp, gpointer ip, gboolean rethrow) ctx.ip = ip; ctx.fp = (gpointer*)(MONO_SPARC_WINDOW_ADDR (sp) [sparc_i6 - 16]); - if (mono_object_isinst (exc, mono_defaults.exception_class)) { + if (mono_object_isinst_checked (exc, mono_defaults.exception_class, &error)) { MonoException *mono_ex = (MonoException*)exc; if (!rethrow) { mono_ex->stack_trace = NULL; mono_ex->trace_ips = NULL; } } + mono_error_assert_ok (&error); mono_handle_exception (&ctx, exc); restore_context (&ctx); @@ -218,8 +221,7 @@ get_throw_exception (gboolean rethrow) /** * mono_arch_get_throw_exception: - * - * Returns a function pointer which can be used to raise exceptions. + * \returns a function pointer which can be used to raise exceptions. * The returned function has the following * signature: void (*func) (MonoException *exc); */ @@ -265,8 +267,7 @@ mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot) /** * 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 @@ -326,7 +327,7 @@ mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot) return start; } -/* mono_arch_find_jit_info: +/* mono_arch_unwind_frame: * * This function is used to gather information from @ctx. It return the * MonoJitInfo of the corresponding function, unwinds one stack frame and @@ -336,7 +337,7 @@ mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot) * start of the function or -1 if that info is not available. */ gboolean -mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, +mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *ji, MonoContext *ctx, MonoContext *new_ctx, MonoLMF **lmf, mgreg_t **save_locations, @@ -350,7 +351,10 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, *new_ctx = *ctx; if (ji != NULL) { - frame->type = FRAME_TYPE_MANAGED; + if (ji->is_trampoline) + frame->type = FRAME_TYPE_TRAMPOLINE; + else + frame->type = FRAME_TYPE_MANAGED; /* Restore ip and sp from the saved register window */ window = MONO_SPARC_WINDOW_ADDR (ctx->sp);