From: John Baldwin Date: Tue, 22 Feb 2022 19:22:14 +0000 (-0800) Subject: do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14b3360508b1;p=binutils-gdb.git do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async. Previously, TARGET_WNOHANG was cleared if a target supported async mode even if async mode wasn't currently enabled. This change only permits TARGET_WNOHANG if async mode is enabled. --- diff --git a/gdb/infrun.c b/gdb/infrun.c index 5311822fcb8..17ec8b27fa4 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3627,7 +3627,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)