aboutsummaryrefslogtreecommitdiff
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
commit14b3360508b185087b9376487cfc49152af023d8 (patch)
treeeafde156ecd0ff0b03bb4139c76bde016b2f4bb0
parent34c9b2b49be0bb0ea3efdc193fc0a8f615775f09 (diff)
downloadgdb-14b3360508b185087b9376487cfc49152af023d8.zip
gdb-14b3360508b185087b9376487cfc49152af023d8.tar.gz
gdb-14b3360508b185087b9376487cfc49152af023d8.tar.bz2
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.
-rw-r--r--gdb/infrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 5311822..17ec8b2 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)