Skip to content
Browse files

Thread id fixes for event processing.

  • Loading branch information...
1 parent b154477 commit a9ad5a5ccda7d1ac022b2e883e6899f3976a5739 @vargaz vargaz committed Feb 28, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 mono/mini/debugger-agent.c
View
7 mono/mini/debugger-agent.c
@@ -3006,6 +3006,10 @@ process_event (EventKind event, gpointer arg, gint32 il_offset, MonoContext *ctx
if (debugger_thread_id == GetCurrentThreadId ())
thread = mono_thread_get_main ();
else thread = mono_thread_current ();
+ } else {
+ if (debugger_thread_id == GetCurrentThreadId () && event != EVENT_KIND_VM_DEATH)
+ // FIXME: Send these with a NULL thread, don't suspend the current thread
+ return;
}
buffer_init (&buf, 128);
@@ -3016,6 +3020,9 @@ process_event (EventKind event, gpointer arg, gint32 il_offset, MonoContext *ctx
buffer_add_byte (&buf, event); // event kind
buffer_add_int (&buf, GPOINTER_TO_INT (l->data)); // request id
+ if (!thread)
+ thread = mono_thread_current ();
+
if (event == EVENT_KIND_VM_START && arg != NULL)
thread = arg;

0 comments on commit a9ad5a5

Please sign in to comment.
Something went wrong with that request. Please try again.