This is the mail archive of the insight@sources.redhat.com mailing list for the Insight 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]

[RFA] quit patch


On some remote targets or simulators, the current method of quitting 
Insight can cause a race condition which results in a segfault.

2002-04-26  Martin M. Hunt  <hunt@redhat.com>

	* library/interface.tcl (gdbtk_force_quit): New function.
	Closes source windows then calls gdb_force_quit.
	(gdbtk_quit): Call gdbtk_force_quit.

Index: library/interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.42
diff -u -u -r1.42 interface.tcl
--- library/interface.tcl       7 Mar 2002 20:22:41 -0000       1.42
+++ library/interface.tcl       26 Apr 2002 17:50:08 -0000
@@ -255,8 +255,20 @@
 # ------------------------------------------------------------------
 proc gdbtk_quit {} {
   if {[gdbtk_quit_check]} {
-    gdb_force_quit
+    gdbtk_force_quit
   }
+}
+
+# ------------------------------------------------------------------
+#  PROCEDURE:  gdbtk_force_quit - Quit the debugger immediately
+# ------------------------------------------------------------------
+proc gdbtk_force_quit {} {
+  # If we don't delete source windows, GDB hooks will
+  # try to update them as we exit
+  foreach win [ManagedWin::find SrcWin] {
+    delete object $win
+  }
+  gdb_force_quit
 }

 # ------------------------------------------------------------------




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