This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Update comment in remote_can_async_p
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 12 Jan 2017 16:15:29 -0000
- Subject: [binutils-gdb] Update comment in remote_can_async_p
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3015c06465584a437261c65a397fbd8f1a71aae7
commit 3015c06465584a437261c65a397fbd8f1a71aae7
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Thu Jan 12 11:15:01 2017 -0500
Update comment in remote_can_async_p
I find this comment counter intuitive, and it probably predates the
always-target-async change. AFAIK, remote will always be async, unless
the user explicitly prevents it with "maint set target-async off".
gdb/ChangeLog:
* remote.c (remote_can_async_p): Update comment.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/remote.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 27aa394..bf0930f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
+ * remote.c (remote_can_async_p): Update comment.
+
+2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
+
* linux-nat.c (linux_nat_can_async_p): Update comment.
2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
diff --git a/gdb/remote.c b/gdb/remote.c
index 837b9ee..c73c30a 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -13653,8 +13653,9 @@ remote_can_async_p (struct target_ops *ops)
{
struct remote_state *rs = get_remote_state ();
+ /* We don't go async if the user has explicitly prevented it with the
+ "maint set target-async" command. */
if (!target_async_permitted)
- /* We only enable async when the user specifically asks for it. */
return 0;
/* We're async whenever the serial device is. */