aboutsummaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-22 16:01:09 +0000
committerTom Tromey <tromey@redhat.com>2012-08-22 16:01:09 +0000
commit706e37059fbfed5beb9fe02921483809dfd86e5b (patch)
treed604042d166fc7545502657f9171d6210f4acc9e /gdb/symmisc.c
parente992eda4f6cece4cccbad807b1307168de924174 (diff)
downloadgdb-706e37059fbfed5beb9fe02921483809dfd86e5b.zip
gdb-706e37059fbfed5beb9fe02921483809dfd86e5b.tar.gz
gdb-706e37059fbfed5beb9fe02921483809dfd86e5b.tar.bz2
* elfread.c (elf_symtab_read): Update.
* objfiles.c (objfiles_bfd_data): New global. (get_objfile_bfd_data, free_objfile_per_bfd_storage) (objfile_bfd_data_free, set_objfile_per_bfd): New functions. (allocate_objfile, free_objfile): Update. (_initialize_objfiles): Initialize objfiles_bfd_data. * objfiles.h (struct objfile_per_bfd_storage): New. (struct objfile) <per_bfd>: New field. <filename_cache>: Remove. (set_objfile_per_bfd): Declare. * symfile.c (reread_symbols): Update. Call set_objfile_per_bfd. (allocate_symtab): Update. * symmisc.c (print_symbol_bcache_statistics): Update. (print_objfile_statistics): Print the size of the BFD obstack. gdb/testsuite * gdb.base/maint.exp: Update.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index d3028e6..3e9ca82 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -93,7 +93,8 @@ print_symbol_bcache_statistics (void)
print_bcache_statistics (psymbol_bcache_get_bcache (objfile->psymbol_cache),
"partial symbol cache");
print_bcache_statistics (objfile->macro_cache, "preprocessor macro cache");
- print_bcache_statistics (objfile->filename_cache, "file name cache");
+ print_bcache_statistics (objfile->per_bfd->filename_cache,
+ "file name cache");
}
}
@@ -147,13 +148,15 @@ print_objfile_statistics (void)
OBJSTAT (objfile, sz_strtab));
printf_filtered (_(" Total memory used for objfile obstack: %d\n"),
obstack_memory_used (&objfile->objfile_obstack));
+ printf_filtered (_(" Total memory used for BFD obstack: %d\n"),
+ obstack_memory_used (&objfile->per_bfd->storage_obstack));
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
bcache_memory_used (psymbol_bcache_get_bcache
(objfile->psymbol_cache)));
printf_filtered (_(" Total memory used for macro cache: %d\n"),
bcache_memory_used (objfile->macro_cache));
printf_filtered (_(" Total memory used for file name cache: %d\n"),
- bcache_memory_used (objfile->filename_cache));
+ bcache_memory_used (objfile->per_bfd->filename_cache));
}
}