Deal with the inferior unloading shared objects.
[deliverable/binutils-gdb.git] / gdb / objfiles.c
index bcd047c11ceacc1413352017e1008c1d1cec1a9d..41ec317bc5c8a661c0c0d40275d1c91a99919041 100644 (file)
@@ -370,9 +370,11 @@ unlink_objfile (objfile)
        {
          *objpp = (*objpp)->next;
          objfile->next = NULL;
-         break;
+         return;
        }
     }
+
+  internal_error ("objfiles.c (unlink_objfile): objfile already unlinked");
 }
 
 
@@ -436,17 +438,6 @@ free_objfile (objfile)
      is unknown, but we play it safe for now and keep each action until
      it is shown to be no longer needed. */
 
-#if defined (CLEAR_SOLIB)
-  CLEAR_SOLIB ();
-  /* CLEAR_SOLIB closes the bfd's for any shared libraries.  But
-     the to_sections for a core file might refer to those bfd's.  So
-     detach any core file.  */
-  {
-    struct target_ops *t = find_core_target ();
-    if (t != NULL)
-      (t->to_detach) (NULL, 0);
-  }
-#endif
   /* I *think* all our callers call clear_symtab_users.  If so, no need
      to call this here.  */
   clear_pc_function_cache ();
This page took 0.039153 seconds and 4 git commands to generate.