aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 25a4d3c..da8ed81 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -8309,9 +8309,13 @@ remote_target::wait (ptid_t ptid, struct target_waitstatus *status,
remote_state *rs = get_remote_state ();
/* Start by clearing the flag that asks for our wait method to be called,
- we'll mark it again at the end if needed. */
+ we'll mark it again at the end if needed. If the target is not in
+ async mode then the async token should not be marked. */
if (target_is_async_p ())
clear_async_event_handler (rs->remote_async_inferior_event_token);
+ else
+ gdb_assert (!async_event_handler_marked
+ (rs->remote_async_inferior_event_token));
ptid_t event_ptid;