summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2009-03-03 13:35:23 +0000
committerPedro Alves <pedro@codesourcery.com>2009-03-03 13:35:23 +0000
commitfb597d271837a83d02703ca6fad12f9590845b3e (patch)
treec1bf8cc44026066e980a6b816076af4dcfbcb60c
parent9de9f540f0e38df29cca71eb7426e5791d1004dd (diff)
downloadgdb-fb597d271837a83d02703ca6fad12f9590845b3e.tar.gz
* top.c (quit_target): Check for target_has_execution before
killing or detaching from inferiors.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/top.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1f2a8ed1d17..ea0e65f434a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/top.c b/gdb/top.c
index d676f0237a5..0e133ff23d8 100644
--- 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. */