Skip to content

Commit

Permalink
do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bsdjhb committed Feb 22, 2022
1 parent 34c9b2b commit 14b3360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdb/infrun.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 14b3360

Please sign in to comment.