aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.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
commit38ba82db783e7dde2e73212be71c92872d875e4d (patch)
treef02a9e9e2af784ede8f53ae280e254245d897c5b /gdb/target.c
parentcdc8e9b28598e0ededa78f67f4c374c3751b9bbe (diff)
downloadgdb-38ba82db783e7dde2e73212be71c92872d875e4d.zip
gdb-38ba82db783e7dde2e73212be71c92872d875e4d.tar.gz
gdb-38ba82db783e7dde2e73212be71c92872d875e4d.tar.bz2
Enable async mode on supported targets in target_resume.
Enabling async mode above the target layer removes duplicate code in ::resume methods of async-capable targets. Commit 5b6d1e4fa4f ("Multi-target support") enabled async mode in do_target_resume after target_resume returns which is a step in this direction. However, other callers of target_resume such as target_continue do not enable async mode. Rather than enabling async mode in each of the callers after target_resume returns, enable async mode at the end of target_resume.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 548cfad..658698b 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2673,6 +2673,9 @@ target_resume (ptid_t ptid, int step, enum gdb_signal signal)
thread's stop_pc as side effect. */
set_executing (curr_target, ptid, true);
clear_inline_frame_state (curr_target, ptid);
+
+ if (target_can_async_p ())
+ target_async (1);
}
/* See target.h. */