Update comment in remote_can_async_p

Message ID 20170111153559.8336-1-simon.marchi@ericsson.com
State New, archived
Headers

Commit Message

Simon Marchi Jan. 11, 2017, 3:35 p.m. UTC
  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.
---
 gdb/remote.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Pedro Alves Jan. 12, 2017, 4:12 p.m. UTC | #1
On 01/11/2017 03:35 PM, Simon Marchi wrote:

> gdb/ChangeLog:
> 
> 	* remote.c (remote_can_async_p): Update comment.

OK.

/me clears old entry from his TODO.

Thanks!
  
Simon Marchi Jan. 12, 2017, 4:15 p.m. UTC | #2
On 2017-01-12 11:12, Pedro Alves wrote:
> On 01/11/2017 03:35 PM, Simon Marchi wrote:
> 
>> gdb/ChangeLog:
>> 
>> 	* remote.c (remote_can_async_p): Update comment.
> 
> OK.
> 
> /me clears old entry from his TODO.
> 
> Thanks!

Thanks, pushed!
  

Patch

diff --git a/gdb/remote.c b/gdb/remote.c
index 837b9ee512..c73c30aacd 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.  */