aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-02-22 11:22:14 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2022-02-22 11:22:14 -0800
commite05523bd2411bac0277da73556f4d01f6c7448aa (patch)
tree6bb11c7419e5c176e0ceec0c246ee850f6365cfc /gdb/infcmd.c
parentd0bbe64c5a3f9608ae5987f1267de7a734ee8151 (diff)
downloadgdb-e05523bd2411bac0277da73556f4d01f6c7448aa.zip
gdb-e05523bd2411bac0277da73556f4d01f6c7448aa.tar.gz
gdb-e05523bd2411bac0277da73556f4d01f6c7448aa.tar.bz2
Enable async mode in the target in attach_cmd.
If the attach target supports async mode, enable it after the attach target's ::attach method returns.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 465c8f3..682bebe 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2600,6 +2600,10 @@ attach_command (const char *args, int from_tty)
thread_state_string (thread->state));
}
+ /* Enable async mode if it is supported by the target. */
+ if (target_can_async_p ())
+ target_async (1);
+
/* Set up the "saved terminal modes" of the inferior
based on what modes we are starting it with. */
target_terminal::init ();