X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fexceptions-ppc.c;h=7f786d99a3906ba0ad943c0c801d5145e362294a;hb=b0e9fb6f6f4791e9c7684c2e9af17f9929ff6564;hp=92399c3a5ee5ba6b1c394d64031ee52cf3485ff6;hpb=3a6b4c58bd789326106a7df732438cced7f7e635;p=mono.git diff --git a/mono/mini/exceptions-ppc.c b/mono/mini/exceptions-ppc.c index 92399c3a5ee..7f786d99a39 100644 --- a/mono/mini/exceptions-ppc.c +++ b/mono/mini/exceptions-ppc.c @@ -338,7 +338,7 @@ mono_ppc_throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, if (!rethrow) mono_ex->stack_trace = NULL; } - mono_handle_exception (&ctx, exc, (gpointer)eip, FALSE); + mono_handle_exception (&ctx, exc); restore_context (&ctx); g_assert_not_reached (); @@ -511,7 +511,8 @@ mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot) gboolean mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *ji, MonoContext *ctx, - MonoContext *new_ctx, MonoLMF **lmf, + MonoContext *new_ctx, MonoLMF **lmf, + mgreg_t **save_locations, StackFrameInfo *frame) { gpointer ip = MONO_CONTEXT_GET_IP (ctx); @@ -519,7 +520,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, memset (frame, 0, sizeof (StackFrameInfo)); frame->ji = ji; - frame->managed = FALSE; *new_ctx = *ctx; setup_context (new_ctx); @@ -533,9 +533,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, frame->type = FRAME_TYPE_MANAGED; - if (!ji->method->wrapper_type || ji->method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD) - frame->managed = TRUE; - if (ji->from_aot) unwind_info = mono_aot_get_unwind_info (ji, &unwind_info_len); else @@ -560,7 +557,8 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, - ip, regs, ppc_lr + 1, &cfa); + ip, regs, ppc_lr + 1, + save_locations, MONO_MAX_IREGS, &cfa); /* we substract 4, so that the IP points into the call instruction */ MONO_CONTEXT_SET_IP (new_ctx, regs [ppc_lr] - 4); @@ -669,14 +667,14 @@ mono_ppc_set_func_into_sigctx (void *sigctx, void *func) } static void -altstack_handle_and_restore (void *sigctx, gpointer obj, gboolean test_only) +altstack_handle_and_restore (void *sigctx, gpointer obj) { void (*restore_context) (MonoContext *); MonoContext mctx; restore_context = mono_get_restore_context (); mono_arch_sigctx_to_monoctx (sigctx, &mctx); - mono_handle_exception (&mctx, obj, (gpointer)mctx.sc_ir, test_only); + mono_handle_exception (&mctx, obj); restore_context (&mctx); } @@ -752,9 +750,9 @@ mono_arch_handle_altstack_exception (void *sigctx, gpointer fault_addr, gboolean * Called by resuming from a signal handler. */ static void -handle_signal_exception (gpointer obj, gboolean test_only) +handle_signal_exception (gpointer obj) { - MonoJitTlsData *jit_tls = TlsGetValue (mono_jit_tls_id); + MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id); MonoContext ctx; static void (*restore_context) (MonoContext *); @@ -763,7 +761,7 @@ handle_signal_exception (gpointer obj, gboolean test_only) memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext)); - mono_handle_exception (&ctx, obj, MONO_CONTEXT_GET_IP (&ctx), test_only); + mono_handle_exception (&ctx, obj); restore_context (&ctx); } @@ -787,7 +785,7 @@ setup_ucontext_return (void *uc, gpointer func) } gboolean -mono_arch_handle_exception (void *ctx, gpointer obj, gboolean test_only) +mono_arch_handle_exception (void *ctx, gpointer obj) { #if defined(MONO_ARCH_USE_SIGACTION) && defined(UCONTEXT_REG_Rn) /* @@ -795,7 +793,7 @@ mono_arch_handle_exception (void *ctx, gpointer obj, gboolean test_only) * 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 = TlsGetValue (mono_jit_tls_id); + MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id); mgreg_t sp; void *sigctx = ctx; int frame_size; @@ -805,7 +803,6 @@ mono_arch_handle_exception (void *ctx, gpointer obj, gboolean test_only) mono_arch_sigctx_to_monoctx (sigctx, &jit_tls->ex_ctx); /* The others in registers */ UCONTEXT_REG_Rn (sigctx, PPC_FIRST_ARG_REG) = (gsize)obj; - UCONTEXT_REG_Rn (sigctx, PPC_FIRST_ARG_REG + 1) = test_only; /* Allocate a stack frame below the red zone */ /* Similar to mono_arch_handle_altstack_exception () */ @@ -824,7 +821,7 @@ mono_arch_handle_exception (void *ctx, gpointer obj, gboolean test_only) mono_arch_sigctx_to_monoctx (ctx, &mctx); - result = mono_handle_exception (&mctx, obj, (gpointer)mctx.sc_ir, test_only); + result = mono_handle_exception (&mctx, obj); /* restore the context so that returning from the signal handler will invoke * the catch clause */ @@ -832,10 +829,3 @@ mono_arch_handle_exception (void *ctx, gpointer obj, gboolean test_only) return result; #endif } - -gboolean -mono_arch_has_unwind_info (gconstpointer addr) -{ - return FALSE; -} -