[PATCH v2 05/13] do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async.

John Baldwin jhb@FreeBSD.org
Tue Aug 3 18:49:52 GMT 2021


Previously, TARGET_WNOHANG was cleared it a target supported async
mode even if async mode wasn't currently enabled.  This change only
permits TARGET_WNOHANG if async mode is enabled.
---
 gdb/infrun.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 815ebf45c1f..e49b3471e3e 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3622,7 +3622,7 @@ do_target_wait_1 (inferior *inf, ptid_t ptid,
 
   /* We can't ask a non-async target to do a non-blocking wait, so this will be
      a blocking wait.  */
-  if (!target_can_async_p ())
+  if (!target_is_async_p ())
     options &= ~TARGET_WNOHANG;
 
   if (deprecated_target_wait_hook)
-- 
2.31.1



More information about the Gdb-patches mailing list