Merge pull request #819 from brendanzagaeski/patch-1
[mono.git] / mono / mini / exceptions-x86.c
index 2d8742d5d4c0109aa5c80f7dff35bd7e694731ea..0fa01593b9df3e32dd86d2d041d15960820fb0df 100644 (file)
@@ -32,7 +32,6 @@
 #include "mini.h"
 #include "mini-x86.h"
 #include "tasklets.h"
-#include "debug-mini.h"
 
 static gpointer signal_exception_trampoline;
 
@@ -496,23 +495,6 @@ mono_x86_throw_exception (mgreg_t *regs, MonoObject *exc,
                        mono_ex->stack_trace = NULL;
        }
 
-       if (mono_debug_using_mono_debugger ()) {
-               guint8 buf [16], *code;
-
-               mono_breakpoint_clean_code (NULL, (gpointer)eip, 8, buf, sizeof (buf));
-               code = buf + 8;
-
-               if (buf [3] == 0xe8) {
-                       MonoContext ctx_cp = ctx;
-                       ctx_cp.eip = eip - 5;
-
-                       if (mono_debugger_handle_exception (&ctx_cp, exc)) {
-                               mono_restore_context (&ctx_cp);
-                               g_assert_not_reached ();
-                       }
-               }
-       }
-
        /* adjust eip so that it point into the call instruction */
        ctx.eip -= 1;
 
@@ -819,10 +801,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
                frame->type = FRAME_TYPE_MANAGED;
 
-               if (ji->from_aot)
-                       unwind_info = mono_aot_get_unwind_info (ji, &unwind_info_len);
-               else
-                       unwind_info = mono_get_cached_unwind_info (ji->used_regs, &unwind_info_len);
+               unwind_info = mono_jinfo_get_unwind_info (ji, &unwind_info_len);
 
                regs [X86_EAX] = new_ctx->eax;
                regs [X86_EBX] = new_ctx->ebx;
@@ -998,9 +977,6 @@ handle_signal_exception (gpointer obj)
 
        memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
 
-       if (mono_debugger_handle_exception (&ctx, (MonoObject *)obj))
-               return;
-
        mono_handle_exception (&ctx, obj);
 
        mono_restore_context (&ctx);
@@ -1111,9 +1087,6 @@ mono_arch_handle_exception (void *sigctx, gpointer obj)
 
        mono_arch_sigctx_to_monoctx (sigctx, &mctx);
 
-       if (mono_debugger_handle_exception (&mctx, (MonoObject *)obj))
-               return TRUE;
-
        mono_handle_exception (&mctx, obj);
 
        mono_arch_monoctx_to_sigctx (&mctx, sigctx);
@@ -1155,12 +1128,6 @@ altstack_handle_and_restore (MonoContext *ctx, gpointer obj, gboolean stack_ovf)
 
        mctx = *ctx;
 
-       if (mono_debugger_handle_exception (&mctx, (MonoObject *)obj)) {
-               if (stack_ovf)
-                       prepare_for_guard_pages (&mctx);
-               mono_restore_context (&mctx);
-       }
-
        mono_handle_exception (&mctx, obj);
        if (stack_ovf)
                prepare_for_guard_pages (&mctx);