diff options
author | Sami Wagiaalla <swagiaal@redhat.com> | 2010-08-31 20:10:42 +0000 |
---|---|---|
committer | Sami Wagiaalla <swagiaal@redhat.com> | 2010-08-31 20:10:42 +0000 |
commit | 710e1a31c41cfebe0c425d54efa309bb7054cbc2 (patch) | |
tree | 3f8172cd66cd3b0d4183083db745b74a727d1f1f /gdb/objfiles.c | |
parent | 6438229074032cc548209c05c42bd57873a72651 (diff) | |
download | gdb-710e1a31c41cfebe0c425d54efa309bb7054cbc2.zip gdb-710e1a31c41cfebe0c425d54efa309bb7054cbc2.tar.gz gdb-710e1a31c41cfebe0c425d54efa309bb7054cbc2.tar.bz2 |
Create and use a specialized bcache type for psymbols
2010-08-31 Sami Wagiaalla <swagiaal@redhat.com>
* symfile.c (reread_symbols): Use psymbol_bcache_free, and
psymbol_bcache_init.
* psymtab.h (psymbol_bcache_init): New function prototype.
(psymbol_bcache_free): New function prototype.
(psymbol_bcache_get_bcache): New function prototype.
* psymtab.c (psymbol_bcache_init): New function.
(psymbol_bcache_free): New function.
(psymbol_bcache_full): New function.
(psymbol_bcache_get_bcache): New function.
(add_psymbol_to_bcache): use psymbol_bcache_full.
* objfiles.h (psymbol_cache): Change type of psymbol_cache to
psymbol_bcache.
* symmisc.c (print_symbol_bcache_statistics): Updated.
(print_objfile_statistics): Updated.
* objfiles.c (allocate_objfile): Use psymbol_bcache_init to initialize
psymbol_cache.
(free_objfile): Use psymbol_bcache_free.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index c55992e..7d5186f 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -199,7 +199,7 @@ allocate_objfile (bfd *abfd, int flags) struct objfile *objfile; objfile = (struct objfile *) xzalloc (sizeof (struct objfile)); - objfile->psymbol_cache = bcache_xmalloc (psymbol_hash, psymbol_compare); + objfile->psymbol_cache = psymbol_bcache_init (); objfile->macro_cache = bcache_xmalloc (NULL, NULL); objfile->filename_cache = bcache_xmalloc (NULL, NULL); /* We could use obstack_specify_allocation here instead, but @@ -658,7 +658,7 @@ free_objfile (struct objfile *objfile) if (objfile->static_psymbols.list) xfree (objfile->static_psymbols.list); /* Free the obstacks for non-reusable objfiles */ - bcache_xfree (objfile->psymbol_cache); + psymbol_bcache_free (objfile->psymbol_cache); bcache_xfree (objfile->macro_cache); bcache_xfree (objfile->filename_cache); if (objfile->demangled_names_hash) |