summaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-04-06 19:50:03 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-04-06 19:50:03 +0000
commit6b8ae1cb9cf43edb299e3b5b03bef5187c1c8bd0 (patch)
treeae4be465e0021f8705737564ae026ee0c2982f68 /gdb/symtab.h
parentc37203a97cba50e890d25f3f3ea7a6653b173675 (diff)
downloadgdb-6b8ae1cb9cf43edb299e3b5b03bef5187c1c8bd0.tar.gz
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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 59bbe2450f3..4913e6c0d80 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