aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gdb/top.c b/gdb/top.c
index 3b93683..a266bfa 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1740,13 +1740,17 @@ quit_force (int *exit_arg, int from_tty)
/* Give all pushed targets a chance to do minimal cleanup, and pop
them all out. */
- try
+ for (inferior *inf : all_inferiors ())
{
- pop_all_targets ();
- }
- catch (const gdb_exception &ex)
- {
- exception_print (gdb_stderr, ex);
+ switch_to_inferior_no_thread (inf);
+ try
+ {
+ pop_all_targets ();
+ }
+ catch (const gdb_exception &ex)
+ {
+ exception_print (gdb_stderr, ex);
+ }
}
/* Save the history information if it is appropriate to do so. */
@@ -2298,7 +2302,6 @@ gdb_init (char *argv0)
#endif
init_cmd_lists (); /* This needs to be done first. */
- initialize_targets (); /* Setup target_terminal macros for utils.c. */
init_page_info ();