diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-04-06 19:50:05 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-04-06 19:50:05 +0000 |
commit | 59d7bcaf18f0f9cff495e7a1a9e08dde859fb1f2 (patch) | |
tree | 118f98db3d708cd3040abc9be056ed0a817e9449 /gdb/symtab.h | |
parent | 8c5fc8001110c72f83edccd8d3872cc868454f54 (diff) | |
download | gdb-59d7bcaf18f0f9cff495e7a1a9e08dde859fb1f2.zip gdb-59d7bcaf18f0f9cff495e7a1a9e08dde859fb1f2.tar.gz gdb-59d7bcaf18f0f9cff495e7a1a9e08dde859fb1f2.tar.bz2 |
gdb/
Code cleanup.
* dictionary.c (dict_hash): Use SYMBOL_HASH_NEXT.
* dwarf2read.c (mapped_index_string_hash): Refer to SYMBOL_HASH_NEXT
in the function comment, a new note on values compatibility.
* minsyms.c (msymbol_hash_iw, msymbol_hash): Use SYMBOL_HASH_NEXT.
* symtab.h (SYMBOL_HASH_NEXT): New.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 59bbe24..4913e6c 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1004,6 +1004,12 @@ extern unsigned int msymbol_hash_iw (const char *); extern unsigned int msymbol_hash (const char *); +/* Compute the next hash value from previous HASH and the character C. This + is only a GDB in-memory computed value with no external files compatibility + requirements. */ + +#define SYMBOL_HASH_NEXT(hash, c) ((hash) * 67 + (c) - 113) + extern struct objfile * msymbol_objfile (struct minimal_symbol *sym); extern void |