Don't call clear_quit_flag after check_quit_flag
authorPedro Alves <palves@redhat.com>
Tue, 12 Apr 2016 15:49:30 +0000 (16:49 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 12 Apr 2016 15:54:49 +0000 (16:54 +0100)
Obviously not necessary since check_quit_flag clears the flag as side
effect.

gdb/ChangeLog:
2016-04-12  Pedro Alves  <palves@redhat.com>

* remote-sim.c (gdb_os_poll_quit): Don't call clear_quit_flag.
* remote.c (remote_wait_as): Don't call clear_quit_flag.

gdb/ChangeLog
gdb/remote-sim.c
gdb/remote.c

index 5a1ae32f26dfc346c0ebddb9005364eeff5aa912..f3dab72c2a525f1979514aaefbb1196965f0a3ba 100644 (file)
@@ -1,3 +1,8 @@
+2016-04-12  Pedro Alves  <palves@redhat.com>
+
+       * remote-sim.c (gdb_os_poll_quit): Don't call clear_quit_flag.
+       * remote.c (remote_wait_as): Don't call clear_quit_flag.
+
 2016-04-12  Pedro Alves  <palves@redhat.com>
 
        * python/python.c: Include "ser-event.h".
index 8489eb6a97e7ed3bbbe8971f932bba6961ae8e35..11d36eb6591db3476ff470033f0c4eb86c88c743 100644 (file)
@@ -955,10 +955,7 @@ gdb_os_poll_quit (host_callback *p)
     deprecated_ui_loop_hook (0);
 
   if (check_quit_flag ())      /* gdb's idea of quit */
-    {
-      clear_quit_flag ();      /* we've stolen it */
-      return 1;
-    }
+    return 1;
   return 0;
 }
 
index 5c407b6bb9cd69a92fa38270fe2407ff0477f19c..443beacab92f401d989247142b51ce62eca80c09 100644 (file)
@@ -6937,10 +6937,7 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options)
          /* If the user hit C-c before this packet, or between packets,
             pretend that it was hit right here.  */
          if (check_quit_flag ())
-           {
-             clear_quit_flag ();
-             sync_remote_interrupt (SIGINT);
-           }
+           sync_remote_interrupt (SIGINT);
        }
 
       /* FIXME: cagney/1999-09-27: If we're in async mode we should