diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9b3b64dcf93e..b53cd2b68be0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2021-02-03 Pedro Alves + + * remote.c (extended_remote_target::attach): Set target async in + the target-non-stop path too. + 2021-02-03 Pedro Alves PR gdb/27055 diff --git a/gdb/remote.c b/gdb/remote.c index bc995edc5387..f183b4f3b0e4 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -6033,7 +6033,12 @@ extended_remote_target::attach (const char *args, int from_tty) } } else - gdb_assert (wait_status == NULL); + { + gdb_assert (wait_status == NULL); + + gdb_assert (target_can_async_p ()); + target_async (1); + } } /* Implementation of the to_post_attach method. */