* infrun.c (follow_fork): Initialize new step_* locals
[deliverable/binutils-gdb.git] / gdb / objfiles.c
index bc77de8635f7899665e6402541b93862d9fe76c0..30a431330be4d75effa98102343ee7fc47ce3f2a 100644 (file)
@@ -422,6 +422,9 @@ free_objfile (struct objfile *objfile)
       (*objfile->sf->sym_finish) (objfile);
     }
 
+  /* Discard any data modules have associated with the objfile.  */
+  objfile_free_data (objfile);
+
   /* We always close the bfd, unless the OBJF_KEEPBFD flag is set.  */
 
   if (objfile->obfd != NULL && !(objfile->flags & OBJF_KEEPBFD))
@@ -476,7 +479,6 @@ free_objfile (struct objfile *objfile)
 
   /* The last thing we do is free the objfile struct itself. */
 
-  objfile_free_data (objfile);
   if (objfile->name != NULL)
     {
       xfree (objfile->name);
@@ -672,7 +674,7 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
     }
 
   /* Relocate breakpoints as necessary, after things are relocated. */
-  breakpoint_re_set ();
+  breakpoint_re_set_objfile (objfile);
 }
 \f
 /* Many places in gdb want to test just to see if we have any partial
This page took 0.025576 seconds and 4 git commands to generate.