2003-01-16 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Thu, 16 Jan 2003 17:06:06 +0000 (17:06 -0000)
committerMartin Baulig <martin@novell.com>
Thu, 16 Jan 2003 17:06:06 +0000 (17:06 -0000)
* debug.c (debugger_thread_func): We don't need to `raise
(SIGSTOP)' anymore; the thread manager already takes care of this.

svn path=/trunk/mono/; revision=10581

mono/jit/ChangeLog
mono/jit/debug.c

index bfe99d98865f04f2351d7fe68c34c3ad053f62e6..02a50f959699ae55f5dfa5e80485677821636892 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 6fd2944a854a3a8154ce4c385f2d5d46d38f6e71..3f96abce9d95e347491cd94e77564bf99c885a64 100644 (file)
@@ -1360,19 +1360,17 @@ debugger_thread_func (gpointer ptr)
 
        /*
         * 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 ();
@@ -1424,6 +1422,11 @@ initialize_debugger_support ()
        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().
         */
@@ -1438,11 +1441,6 @@ initialize_debugger_support ()
         */
        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;