mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
Enable custom bcache hash function.
2010-08-25 Sami Wagiaalla <swagiaal@redhat.com> * psymtab.c (add_psymbol_to_bcache): Remove 'static' from 'static partial_symbol psymbol'. (psymbol_hash): New function. (psymbol_compare): New function. * bcache.c (hash_continue): New. (hash): Use hash_continue. * bcache.c: Add hash_function and compare_function pointers to bcache struct. (bcache_full): Use bcache->hash_function, and bcache->compare_function. (bcache_compare): New function. (bcache_xmalloc): Take hash_function and compare_function arguments and initialize the bcach's pointers. Updated comment. * objfiles.c (allocate_objfile): Updated. * symfile.c (reread_symbols): Updated. * python/py-type.c (typy_richcompare): Updated.
This commit is contained in:
@@ -199,9 +199,9 @@ allocate_objfile (bfd *abfd, int flags)
|
||||
struct objfile *objfile;
|
||||
|
||||
objfile = (struct objfile *) xzalloc (sizeof (struct objfile));
|
||||
objfile->psymbol_cache = bcache_xmalloc ();
|
||||
objfile->macro_cache = bcache_xmalloc ();
|
||||
objfile->filename_cache = bcache_xmalloc ();
|
||||
objfile->psymbol_cache = bcache_xmalloc (psymbol_hash, psymbol_compare);
|
||||
objfile->macro_cache = bcache_xmalloc (NULL, NULL);
|
||||
objfile->filename_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);
|
||||
|
||||
Reference in New Issue
Block a user