Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wait_for_attach change to gc safe mode
  • Loading branch information
srxqds authored Nov 30, 2021
commit 60b19dc2cb5b0a5c6d6396ac2341640c271b9232
5 changes: 3 additions & 2 deletions src/mono/mono/component/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -10031,8 +10031,10 @@ wait_for_attach (void)
}

/* Block and wait for client connection */
MONO_ENTER_GC_SAFE;
conn_fd = socket_transport_accept (listen_fd);

MONO_EXIT_GC_SAFE;

PRINT_DEBUG_MSG (1, "Accepted connection on %d\n", conn_fd);
if (conn_fd == -1) {
PRINT_DEBUG_MSG (1, "[dbg] Bad client connection\n");
Expand Down Expand Up @@ -10140,7 +10142,6 @@ debugger_thread (void *arg)

internal->state |= ThreadState_Background;
internal->flags |= MONO_THREAD_FLAG_DONT_MANAGE;
mono_thread_info_set_flags(MONO_THREAD_INFO_FLAGS_NO_GC | MONO_THREAD_INFO_FLAGS_NO_SAMPLE);

if (agent_config.defer) {
if (!wait_for_attach ()) {
Expand Down