aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.h
diff options
context:
space:
mode:
authorSami Wagiaalla <swagiaal@redhat.com>2010-08-31 20:10:42 +0000
committerSami Wagiaalla <swagiaal@redhat.com>2010-08-31 20:10:42 +0000
commit710e1a31c41cfebe0c425d54efa309bb7054cbc2 (patch)
tree3f8172cd66cd3b0d4183083db745b74a727d1f1f /gdb/psymtab.h
parent6438229074032cc548209c05c42bd57873a72651 (diff)
downloadgdb-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/psymtab.h')
-rw-r--r--gdb/psymtab.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/psymtab.h b/gdb/psymtab.h
index 0786944..b104672 100644
--- a/gdb/psymtab.h
+++ b/gdb/psymtab.h
@@ -20,8 +20,13 @@
#ifndef PSYMTAB_H
#define PSYMTAB_H
-extern unsigned long psymbol_hash (const void *addr, int length);
-extern int psymbol_compare (const void *addr1, const void *addr2, int length);
+/* A bcache for partial symbols. */
+
+struct psymbol_bcache;
+
+extern struct psymbol_bcache *psymbol_bcache_init (void);
+extern void psymbol_bcache_free (struct psymbol_bcache *);
+extern struct bcache *psymbol_bcache_get_bcache (struct psymbol_bcache *);
void map_partial_symbol_names (void (*) (const char *, void *), void *);