Switch the inferior too in switch_to_program_space_and_thread
[deliverable/binutils-gdb.git] / gdb / progspace.c
index 96f8acc64cd59106eee203ca0962ce9b4b35fba8..136104034795efef1ddd1451ed8bdf173670723a 100644 (file)
@@ -147,6 +147,9 @@ program_space::~program_space ()
   no_shared_libraries (NULL, 0);
   exec_close ();
   free_all_objfiles ();
+  /* Defer breakpoint re-set because we don't want to create new
+     locations for this pspace which we're tearing down.  */
+  clear_symtab_users (SYMFILE_DEFER_BP_RESET);
   if (!gdbarch_has_shared_address_space (target_gdbarch ()))
     free_address_space (this->aspace);
   clear_section_table (&this->target_sections);
@@ -168,8 +171,6 @@ program_space::free_all_objfiles ()
 
   while (!objfiles_list.empty ())
     objfiles_list.front ()->unlink ();
-
-  clear_symtab_users (0);
 }
 
 /* See progspace.h.  */
This page took 0.025148 seconds and 4 git commands to generate.