mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:54:41 +08:00
* coffread.c (coff_symfile_finish): Call dwarf2_free_objfile.
* dwarf2read.c (dwarf2_free_objfile): New. * elfread.c (elf_symfile_finish): Call dwarf2_free_objfile. * symfile.h (dwarf2_free_objfile): Declare.
This commit is contained in:
parent
af81c53cb7
commit
fe3e1990b3
@ -1,3 +1,10 @@
|
||||
2007-10-21 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* coffread.c (coff_symfile_finish): Call dwarf2_free_objfile.
|
||||
* dwarf2read.c (dwarf2_free_objfile): New.
|
||||
* elfread.c (elf_symfile_finish): Call dwarf2_free_objfile.
|
||||
* symfile.h (dwarf2_free_objfile): Declare.
|
||||
|
||||
2007-10-21 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* hppa-hpux-nat.c (hppa_hpux_store_register): Add missing semi-colon.
|
||||
|
@ -665,6 +665,8 @@ coff_symfile_finish (struct objfile *objfile)
|
||||
|
||||
/* Let stabs reader clean up */
|
||||
stabsread_clear_cache ();
|
||||
|
||||
dwarf2_free_objfile (objfile);
|
||||
}
|
||||
|
||||
|
||||
|
@ -9964,6 +9964,22 @@ free_one_cached_comp_unit (void *target_cu)
|
||||
}
|
||||
}
|
||||
|
||||
/* Release all extra memory associated with OBJFILE. */
|
||||
|
||||
void
|
||||
dwarf2_free_objfile (struct objfile *objfile)
|
||||
{
|
||||
dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
|
||||
|
||||
if (dwarf2_per_objfile == NULL)
|
||||
return;
|
||||
|
||||
/* Cached DIE trees use xmalloc and the comp_unit_obstack. */
|
||||
free_cached_comp_units (NULL);
|
||||
|
||||
/* Everything else should be on the objfile obstack. */
|
||||
}
|
||||
|
||||
/* A pair of DIE offset and GDB type pointer. We store these
|
||||
in a hash table separate from the DIEs, and preserve them
|
||||
when the DIEs are flushed out of cache. */
|
||||
|
@ -709,6 +709,8 @@ elf_symfile_finish (struct objfile *objfile)
|
||||
{
|
||||
xfree (objfile->deprecated_sym_stab_info);
|
||||
}
|
||||
|
||||
dwarf2_free_objfile (objfile);
|
||||
}
|
||||
|
||||
/* ELF specific initialization routine for reading symbols.
|
||||
|
@ -365,6 +365,8 @@ extern int dwarf2_has_info (struct objfile *);
|
||||
extern void dwarf2_build_psymtabs (struct objfile *, int);
|
||||
extern void dwarf2_build_frame_info (struct objfile *);
|
||||
|
||||
void dwarf2_free_objfile (struct objfile *);
|
||||
|
||||
/* From mdebugread.c */
|
||||
|
||||
/* Hack to force structures to exist before use in parameter list. */
|
||||
|
Loading…
Reference in New Issue
Block a user