Tom Tromey | 30 Jul 2012 17:22
Picon
Favicon

[PATCH 6/9] move macro cache to bfd

This patch moves the macro cache to the objfile per-BFD storage.

	* dwarf2read.c (macro_start_file): Update.
	* objfiles.c (get_objfile_bfd_data): Initialize macro_cache.
	(free_objfile_per_bfd_storage): Destroy macro_cache.
	(allocate_objfile, free_objfile): Update.
	* objfiles.h (struct objfile_per_bfd_storage) <macro_cache>:
	New field.
	(struct objfile) <macro_cache>: Remove.
	* symfile.c (reread_symbols): Update.
	* symmisc.c (print_symbol_bcache_statistics): Update.
	(print_objfile_statistics): Update.
---
 gdb/dwarf2read.c |    4 ++--
 gdb/objfiles.c   |    4 ++--
 gdb/objfiles.h   |    4 +++-
 gdb/symfile.c    |    2 --
 gdb/symmisc.c    |    5 +++--
 5 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8295857..b98e486 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
 <at>  <at>  -17082,8 +17082,8  <at>  <at>  macro_start_file (int file, int line,
   /* We don't create a macro table for this compilation unit
      at all until we actually get a filename.  */
   if (! pending_macros)
-    pending_macros = new_macro_table (&objfile->objfile_obstack,
-                                      objfile->macro_cache);
(Continue reading)


Gmane