public Debugger()
{
}
+
+#if MONODROID
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]
+ private extern static void Mono_UnhandledException_internal (Exception ex);
+
+ internal static void Mono_UnhandledException (Exception ex)
+ {
+ Mono_UnhandledException_internal (ex);
+ }
+#endif
}
}
return agent_config.enabled;
}
+#ifdef PLATFORM_ANDROID
+void
+mono_debugger_agent_unhandled_exception (MonoException *exc)
+{
+ int suspend_policy;
+ GSList *events;
+ EventInfo ei;
+
+ if (!inited)
+ return;
+
+ memset (&ei, 0, sizeof (EventInfo));
+ ei.exc = (MonoObject*)exc;
+
+ mono_loader_lock ();
+ events = create_event_list (EVENT_KIND_EXCEPTION, NULL, NULL, &ei, &suspend_policy);
+ mono_loader_unlock ();
+
+ process_event (EVENT_KIND_EXCEPTION, &ei, 0, NULL, events, suspend_policy);
+}
+#endif
+
void
mono_debugger_agent_handle_exception (MonoException *exc, MonoContext *throw_ctx,
MonoContext *catch_ctx)
gboolean mono_debugger_agent_thread_interrupt (void *sigctx, MonoJitInfo *ji) MONO_INTERNAL;
+#ifdef PLATFORM_ANDROID
+void
+mono_debugger_agent_unhandled_exception (MonoException *exc);
+#endif
+
void
mono_debugger_agent_handle_exception (MonoException *ext, MonoContext *throw_ctx, MonoContext *catch_ctx) MONO_INTERNAL;
mono_add_internal_call ("Mono.Runtime::mono_runtime_install_handlers",
mono_runtime_install_handlers);
+#ifdef PLATFORM_ANDROID
+ mono_add_internal_call ("System.Diagnostics.Debugger::Mono_UnhandledException_internal",
+ mono_debugger_agent_unhandled_exception);
+#endif
+
mono_create_helper_signatures ();
register_jit_stats ();