* top.c (quit_target): Check for target_has_execution before
authorPedro Alves <palves@redhat.com>
Tue, 3 Mar 2009 13:35:24 +0000 (13:35 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 3 Mar 2009 13:35:24 +0000 (13:35 +0000)
killing or detaching from inferiors.

gdb/ChangeLog
gdb/top.c

index 1f2a8ed1d17e13cd61fc54e7d8f0a271f3f7100f..ea0e65f434ab1c8401751e6e6a2f88e929b8c6d9 100644 (file)
@@ -1,3 +1,8 @@
+2009-03-03  Pedro Alves  <pedro@codesourcery.com>
+
+       * top.c (quit_target): Check for target_has_execution before
+       killing or detaching from inferiors.
+
 2009-03-02  Joel Brobecker  <brobecker@adacore.com>
 
        Remove some unused routines.
index d676f0237a59ac68b5a7767285c4d57147c9e947..0e133ff23d839ca05b0a7f6fd2307504a6b6ee17 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1246,7 +1246,8 @@ quit_target (void *arg)
   struct qt_args *qt = (struct qt_args *)arg;
 
   /* Kill or detach all inferiors.  */
-  iterate_over_inferiors (kill_or_detach, qt);
+  if (target_has_execution)
+    iterate_over_inferiors (kill_or_detach, qt);
 
   /* Give all pushed targets a chance to do minimal cleanup, and pop
      them all out.  */