+2003-01-16 Martin Baulig <martin@ximian.com>
+
+ * debug.c (debugger_thread_func): We don't need to `raise
+ (SIGSTOP)' anymore; the thread manager already takes care of this.
+
2003-01-16 Dietmar Maurer <dietmar@ximian.com>
* exception.c (arch_handle_exception): exclude runtime invoke
[FIXME: This avoids an assertion failure on startup, but there's
still an issue with thread termination.]
+2003-01-16 Martin Baulig <martin@ximian.com>
+
+ * debug.c (debugger_thread_func): We don't need to `raise
+ (SIGSTOP)' anymore; the thread manager already takes care of this.
+
2003-01-16 Martin Baulig <martin@ximian.com>
* debug.c: Use the mono/io-layer functions here instead of gthread.
/*
* Ok, we're now running in the debugger - signal the parent thread that
- * we're ready and enter the event loop.
+ * we're ready and enter the event loop. Note that the condition is not
+ * signalled before the debugger attached to us, so we don't need to raise
+ * a SIGSTOP here anymore.
*/
g_assert (WaitForSingleObject (debugger_start_cond, INFINITE) == WAIT_OBJECT_0);
/*
- * Lock the mutex and raise a SIGSTOP to give the debugger a chance to
- * attach to us. This is important since the `notification_code' contains a
- * breakpoint instruction which would otherwise be deadly for us.
+ * Lock the mutex and enter the main event loop.
*/
mono_debugger_lock ();
- raise (SIGSTOP);
-
while (TRUE) {
/* Wait for an event. */
mono_debugger_unlock ();
debugger_notification_address = buf;
x86_ret (buf);
+ /*
+ * We keep this mutex until mono_debugger_jit_exec().
+ */
+ mono_debugger_lock ();
+
/*
* This mutex is only unlocked in mono_debugger_wait().
*/
*/
mono_debugger_init_thread_debug (debugger_background_thread);
ReleaseSemaphore (debugger_start_cond, 1, NULL);
-
- /*
- * We keep this mutex until mono_debugger_jit_exec().
- */
- mono_debugger_lock ();
}
static GPtrArray *breakpoints = NULL;