This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] move dwarf2_free_objfile to dwarf2_per_objfile_cleanup


> 2009-09-04  Doug Evans  <dje@google.com>
> 
> 	* symfile.h (dwarf2_free_objfile): Delete.
> 	* dwarf2read.c (dwarf2_build_psymtabs_hard): Pass dwarf2_per_objfile
> 	to free_cached_comp_units.
> 	(free_cached_comp_units): Remove reference to global
> 	dwarf2_per_objfile, use passed parameter instead.
> 	(dwarf2_free_objfile): Delete, contents moved to ...
> 	(dwarf2_per_objfile_cleanup): ... here.
> 	* coffread.c (coff_symfile_finish): Delete call to dwarf2_free_objfile.
> 	* elfread.c (elf_symfile_finish): Delete call to dwarf2_free_objfile.

Not really an expert in this area, but does it look like you are
re-reading the per-objfile data a second time when converting from
a psymtab to a symtab? On the plus side, I really find it makes
the code clearer to understand - it's a bit hard to figure out
the lifetime of this global... Was the memory every released before?
(I see two calls to sym_finish, one when free_objfile is called,
and one when reread_symbols is called - these two are not necessarily
called after the symtab has been computed)

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]