Merge pull request #2844 from radical/assign-proj-config
[mono.git] / mono / mini / debugger-agent.c
index b2712b486eb1dcea61a4dcc220c2550953f907ca..db15fc43917ffa629f7f881e92ed58a89602ef17 100644 (file)
@@ -9690,8 +9690,10 @@ debugger_thread (void *arg)
        debugger_thread_id = mono_native_thread_id_get ();
 
        attach_cookie = mono_jit_thread_attach (mono_get_root_domain (), &attach_dummy);
+       MonoInternalThread *thread = mono_thread_internal_current ();
+       mono_thread_set_name_internal (thread, mono_string_new (mono_get_root_domain (), "Debugger agent"), TRUE);
 
-       mono_thread_internal_current ()->flags |= MONO_THREAD_FLAG_DONT_MANAGE;
+       thread->flags |= MONO_THREAD_FLAG_DONT_MANAGE;
 
        mono_set_is_debugger_attached (TRUE);