This is the mail archive of the gdb-patches@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]

[commit] Tweak previous patch for quit_flag in event-top.c


This patch fixes a regression in the gdb testuite for the previous
patch I committed, and also adds proper attribution for the origin of
the original patch.

-Fred



Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.8176
diff -u -p -r1.8176 ChangeLog
--- ChangeLog	9 Feb 2007 20:52:16 -0000	1.8176
+++ ChangeLog	9 Feb 2007 23:44:15 -0000
@@ -1,3 +1,9 @@
+2007-02-09  Fred Fish  <fnf@specifix.com>
+
+	Based on work by Apple Computer, Inc.
+	* event-top.c (async_request_quit): Call quit() whenever either
+	quit_flag is set or immediate_quit is set.
+
 2007-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
 	* ada-lang.c (remove_out_of_scope_renamings): Change third parameter's
@@ -115,6 +121,7 @@
 
 2007-02-08  Fred Fish  <fnf@specifix.com>
 
+	Based on work by Apple Computer, Inc.
 	* event-top.c (handle_sigint): Set quit_flag.
 	(async_request_quit): Don't set quit_flag.  Avoid calling quit()
 	if quit_flag has already been reset.
Index: event-top.c
===================================================================
RCS file: /cvs/src/src/gdb/event-top.c,v
retrieving revision 1.49
diff -u -p -r1.49 event-top.c
--- event-top.c	8 Feb 2007 16:25:25 -0000	1.49
+++ event-top.c	9 Feb 2007 23:44:15 -0000
@@ -997,14 +997,13 @@ void
 async_request_quit (gdb_client_data arg)
 {
   /* If the quit_flag has gotten reset back to 0 by the time we get
-     back here, that means that an exception was thrown to unwind
-     the current command before we got back to the event loop.  So
-     there is no reason to call quit again here. */
+     back here, that means that an exception was thrown to unwind the
+     current command before we got back to the event loop.  So there
+     is no reason to call quit again here, unless immediate_quit is
+     set.*/
 
-  if (quit_flag == 0)
-    return;
-
-  quit ();
+  if (quit_flag || immediate_quit)
+    quit ();
 }
 
 #ifdef SIGQUIT

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