This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Don't call clear_quit_flag in command_handler


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4a81fd47b3052f4c1601f8eb7f7879b12e0473cd

commit 4a81fd47b3052f4c1601f8eb7f7879b12e0473cd
Author: Pedro Alves <palves@redhat.com>
Date:   Tue Apr 12 16:49:30 2016 +0100

    Don't call clear_quit_flag in command_handler
    
    This just looks totally wrong to me, for completetly discarding a
    user-requested Ctrl-C.  I can't think of why we'd want do this here.
    
    Actually, I digged the history, and found out that this has been here
    since at least 7b4ac7e1ed2c (gdb-2.4, the initial revision, 1988), at
    a time were we had a top level setjmp/longjmp, long before that got
    wrapped in throw_exception and friends, and this code was in an
    explicit loop, with the quit_flag cleared on every iteration, before
    executing a command...
    
    gdb/ChangeLog:
    2016-04-12  Pedro Alves  <palves@redhat.com>
    
    	* event-top.c (command_handler): Don't call clear_quit_flag.

Diff:
---
 gdb/ChangeLog   | 4 ++++
 gdb/event-top.c | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f3dab72..f01183e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2016-04-12  Pedro Alves  <palves@redhat.com>
 
+	* event-top.c (command_handler): Don't call clear_quit_flag.
+
+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.
 
diff --git a/gdb/event-top.c b/gdb/event-top.c
index eef1514..69087cc 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -460,7 +460,6 @@ command_handler (char *command)
   struct cleanup *stat_chain;
   char *c;
 
-  clear_quit_flag ();
   if (instream == stdin)
     reinitialize_more_filter ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]