diff options
author | Pedro Alves <palves@redhat.com> | 2015-10-14 14:13:43 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-10-14 16:25:22 +0100 |
commit | 522843ab5208e49b294a0350f484b9f59f0d9fe1 (patch) | |
tree | ef2ae5dfd2b4d3a58aee7bc98395ad0c011db1e9 | |
parent | 584e79928884a7acc1c0912debdb598d191600b5 (diff) | |
download | binutils-gdb-users/palves/remote-all-stop-non-stop.tar.gz |
remote: enable "maint set target-non-stop" by defaultusers/palves/remote-all-stop-non-stop
... on remote targets that support it.
gdb/ChangeLog:
2015-10-14 Pedro Alves <palves@redhat.com>
* remote.c (remote_always_non_stop_p): New function.
(init_remote_ops): Install it as to_always_non_stop_p method.
-rw-r--r-- | gdb/remote.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index c7a01d2e5a4..5e882213270 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -11598,6 +11598,20 @@ remote_supports_non_stop (struct target_ops *self) return 1; } +/* to_always_non_stop_p implementation. */ + +static int +remote_always_non_stop_p (struct target_ops *self) +{ + struct remote_state *rs = get_remote_state (); + + /* Only enable if the stub supports the minimum set of optional + packets that make AS/NS possible. */ + return (packet_support (PACKET_QNonStop) == PACKET_ENABLE + && packet_support (PACKET_no_resumed) == PACKET_ENABLE + && packet_support (PACKET_QThreadEvents) == PACKET_ENABLE); +} + static int remote_supports_disable_randomization (struct target_ops *self) { @@ -12986,6 +13000,7 @@ Specify the serial device it is connected to\n\ remote_ops.to_terminal_inferior = remote_terminal_inferior; remote_ops.to_terminal_ours = remote_terminal_ours; remote_ops.to_supports_non_stop = remote_supports_non_stop; + remote_ops.to_always_non_stop_p = remote_always_non_stop_p; remote_ops.to_supports_multi_process = remote_supports_multi_process; remote_ops.to_supports_disable_randomization = remote_supports_disable_randomization; |