* breakpoint.c (breakpoint_1): Walk the breakpoint chain to decide if
[deliverable/binutils-gdb.git] / gdb / xcoffexec.c
index 0e997b1d8f7615c2dc7832e063129d4e0ccb05bd..65a57b59f9f3aa2343b0dd2b8ada03d4dfa5cde2 100644 (file)
@@ -81,6 +81,7 @@ exec_close(quitting)
 {
   register struct vmap *vp, *nxt;
   struct objfile *obj;
+  int need_symtab_cleanup = 0;
   
   for (nxt = vmap; vp = nxt; )
     {
@@ -90,7 +91,10 @@ exec_close(quitting)
         free_objfile() will do proper cleanup of objfile *and* bfd. */
                   
       if (vp->objfile)
-       free_objfile (vp->objfile);
+       {
+         free_objfile (vp->objfile);
+         need_symtab_cleanup = 1;
+       }
       else
        bfd_close(vp->bfd);
 
@@ -111,6 +115,9 @@ exec_close(quitting)
     exec_ops.to_sections = NULL;
     exec_ops.to_sections_end = NULL;
   }
+
+  if (need_symtab_cleanup)
+    clear_symtab_users ();
 }
 
 /*
This page took 0.024621 seconds and 4 git commands to generate.