aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-22 16:12:50 +0000
committerTom Tromey <tromey@redhat.com>2012-08-22 16:12:50 +0000
commit6532ff3697890085456f353dd49068edfd4ed422 (patch)
tree1db3205556da46561d9f588d8acfdb1239f54e2b /gdb/objfiles.c
parent706e37059fbfed5beb9fe02921483809dfd86e5b (diff)
downloadgdb-6532ff3697890085456f353dd49068edfd4ed422.zip
gdb-6532ff3697890085456f353dd49068edfd4ed422.tar.gz
gdb-6532ff3697890085456f353dd49068edfd4ed422.tar.bz2
* 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.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 250cf35..d5317a8 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -141,6 +141,7 @@ get_objfile_bfd_data (struct objfile *objfile, struct bfd *abfd)
obstack_init (&storage->storage_obstack);
storage->filename_cache = bcache_xmalloc (NULL, NULL);
+ storage->macro_cache = bcache_xmalloc (NULL, NULL);
}
return storage;
@@ -152,6 +153,7 @@ static void
free_objfile_per_bfd_storage (struct objfile_per_bfd_storage *storage)
{
bcache_xfree (storage->filename_cache);
+ bcache_xfree (storage->macro_cache);
obstack_free (&storage->storage_obstack, 0);
}
@@ -251,7 +253,6 @@ allocate_objfile (bfd *abfd, int flags)
objfile = (struct objfile *) xzalloc (sizeof (struct objfile));
objfile->psymbol_cache = psymbol_bcache_init ();
- objfile->macro_cache = bcache_xmalloc (NULL, NULL);
/* We could use obstack_specify_allocation here instead, but
gdb_obstack.h specifies the alloc/dealloc functions. */
obstack_init (&objfile->objfile_obstack);
@@ -676,7 +677,6 @@ free_objfile (struct objfile *objfile)
xfree (objfile->static_psymbols.list);
/* Free the obstacks for non-reusable objfiles. */
psymbol_bcache_free (objfile->psymbol_cache);
- bcache_xfree (objfile->macro_cache);
if (objfile->demangled_names_hash)
htab_delete (objfile->demangled_names_hash);
obstack_free (&objfile->objfile_obstack, 0);