X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fdebugger-agent.c;h=dae5ed21a1c9c053dc50fad0398c06549942855e;hb=c6676b0ff882733f0cbfea92cdf96cf1be6f5858;hp=e2df12bb6e649fee475908f0c64a3e95a6e3a226;hpb=cfe7502c1cab362c9d2a6498ea2bcd2a203d31be;p=mono.git diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c index e2df12bb6e6..dae5ed21a1c 100644 --- a/mono/mini/debugger-agent.c +++ b/mono/mini/debugger-agent.c @@ -3662,13 +3662,10 @@ process_event (EventKind event, gpointer arg, gint32 il_offset, MonoContext *ctx return; if (agent_config.defer) { - /* Make sure the thread id is always set when doing deferred debugging */ if (is_debugger_thread ()) { /* Don't suspend on events from the debugger thread */ suspend_policy = SUSPEND_POLICY_NONE; - thread = mono_thread_get_main (); } - else thread = mono_thread_current (); } else { if (is_debugger_thread () && event != EVENT_KIND_VM_DEATH) // FIXME: Send these with a NULL thread, don't suspend the current thread @@ -3691,7 +3688,7 @@ process_event (EventKind event, gpointer arg, gint32 il_offset, MonoContext *ctx thread = NULL; } else { if (!thread) - thread = mono_thread_current (); + thread = is_debugger_thread () ? mono_thread_get_main () : mono_thread_current (); if (event == EVENT_KIND_VM_START && arg != NULL) thread = (MonoThread *)arg;