aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-02-03 16:07:53 +0100
committerPedro Alves <palves@redhat.com>2015-02-03 16:07:53 +0100
commitd9d41e786a077db1b536b1124af6e135b9ad46a0 (patch)
tree1eb216b087ea45fdaf784700d4f6e04e5aa25558 /gdb/remote.c
parent64d2901806c171c0d949f8fb1b29b4e5ba8cf04d (diff)
downloadgdb-d9d41e786a077db1b536b1124af6e135b9ad46a0.zip
gdb-d9d41e786a077db1b536b1124af6e135b9ad46a0.tar.gz
gdb-d9d41e786a077db1b536b1124af6e135b9ad46a0.tar.bz2
Fix up some target is-async vs can-async confusions
In all these cases we're interested in whether the target is currently async, with its event sources installed in the event loop, not whether it can async if needed. Also, I'm not seeing the point of the target_async call from within linux_nat_wait. That's normally done on resume instead, which this target already does. Tested on x86_64 Fedora 20, native and gdbserver. gdb/ 2015-02-03 Pedro Alves <palves@redhat.com> * linux-nat.c (linux_child_follow_fork, linux_nat_wait_1): Use target_is_async_p instead of target_can_async. (linux_nat_wait): Use target_is_async_p instead of target_can_async. Don't enable async here. * remote.c (interrupt_query, remote_wait, putpkt_binary): Use target_is_async_p instead of target_can_async.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index c4d09ba..9be15cb 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -5079,7 +5079,7 @@ interrupt_query (void)
{
target_terminal_ours ();
- if (target_can_async_p ())
+ if (target_is_async_p ())
{
signal (SIGINT, handle_sigint);
quit ();
@@ -6036,7 +6036,7 @@ remote_wait (struct target_ops *ops,
else
event_ptid = remote_wait_as (ptid, status, options);
- if (target_can_async_p ())
+ if (target_is_async_p ())
{
/* If there are are events left in the queue tell the event loop
to return here. */
@@ -7226,7 +7226,7 @@ putpkt_binary (const char *buf, int cnt)
case it's not possible to issue a command while the target is
running. This is not a problem in non-stop mode, because in that
case, the stub is always ready to process serial input. */
- if (!non_stop && target_can_async_p () && rs->waiting_for_stop_reply)
+ if (!non_stop && target_is_async_p () && rs->waiting_for_stop_reply)
{
error (_("Cannot execute this command while the target is running.\n"
"Use the \"interrupt\" command to stop the target\n"