Revert "gdb: add assert in remote_target::wait relating to async being off"
authorAndrew Burgess <aburgess@redhat.com>
Thu, 25 Nov 2021 13:34:18 +0000 (13:34 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 25 Nov 2021 13:34:48 +0000 (13:34 +0000)
This commit introduced a test failure in gdb.server/attach-flag.exp.
I didn't spot this failure originally as the problem is fixed by this,
as yet unpushed patch:

  https://sourceware.org/pipermail/gdb-patches/2021-November/183768.html

I unfortunately didn't test each patch in the original series
independently.  I'll repost this patch after the above patch has been
merged.

This reverts commit 32b1f5e8d6b8ddd3be6e471c26dd85a1dac31dda.

gdb/remote.c

index da8ed81ba7840a5840501ce4e41e3ab51f124664..25a4d3cab6ecf81992bc6e82f388d3730b6a597d 100644 (file)
@@ -8309,13 +8309,9 @@ 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.  If the target is not in
-     async mode then the async token should not be marked.  */
+     we'll mark it again at the end if needed.  */
   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;