Multi-target support
[deliverable/binutils-gdb.git] / gdb / top.c
index 3b93683cfafae5e9a36ce8fb8409c3497cd383b9..a266bfa59256406b64624b1ee6547c1668b15293 100644 (file)
--- 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 ();
 
This page took 0.02684 seconds and 4 git commands to generate.