Skip to content

Commit

Permalink
Merge pull request mono#1706 from Unity-Technologies/unity-2021.3-mbe…
Browse files Browse the repository at this point in the history
…-fix-uum-16704

2021.3:Restarting debugger thread after it's been stopped on call to mono_de…
  • Loading branch information
ppandi-rythmos committed Jan 10, 2023
2 parents c3e6b32 + 19b254a commit 81a7696
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mono/mini/debugger-agent.c
Expand Up @@ -920,9 +920,13 @@ mono_debugger_get_generate_debug_info ()
}

MONO_API void
mono_debugger_disconnect (const char *message)
mono_debugger_disconnect ()
{
stop_debugger_thread ();

//restart debugger thread now that we've forcefully disconnected any clients
mono_atomic_cas_i32(&agent_inited, 0, 1);
finish_agent_init(FALSE);
}

typedef void (*MonoDebuggerAttachFunc)(gboolean attached);
Expand Down Expand Up @@ -1742,6 +1746,7 @@ start_debugger_thread (MonoError *error)
debugger_thread_handle = mono_threads_open_thread_handle (thread->handle);
g_assert (debugger_thread_handle);

debugger_thread_exited = FALSE;
}

/*
Expand Down

0 comments on commit 81a7696

Please sign in to comment.