summaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c3
1 files changed, 2 insertions, 1 deletions
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. */