aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2009-03-11 20:26:02 +0000
committerDaniel Jacobowitz <drow@false.org>2009-03-11 20:26:02 +0000
commitc5bc3a77a2085c737a1ced35de5470ffea2a646c (patch)
tree65d31a39321d6d530f58253c55970a5288954a6e /gdb/objfiles.c
parent09e8c3bf89960586cdca95e1ccf044be35497ae0 (diff)
downloadgdb-c5bc3a77a2085c737a1ced35de5470ffea2a646c.zip
gdb-c5bc3a77a2085c737a1ced35de5470ffea2a646c.tar.gz
gdb-c5bc3a77a2085c737a1ced35de5470ffea2a646c.tar.bz2
* breakpoint.c (bpstat_check_breakpoint_conditions): Use
value_mark and value_free_to_mark. * objfiles.c (free_objfile): Call objfile_free_data before freeing the BFD.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index bc77de8..795d53b 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -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);