aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2000-03-07 04:33:52 +0000
committerJim Blandy <jimb@codesourcery.com>2000-03-07 04:33:52 +0000
commit9227b5eb3d7250fbab15403782b3187f2b9e937c (patch)
treed91a0c4e541f296c5b60bb91a22ae690cce252d7 /gdb/symtab.h
parentded0aeb7910b20f42da2a71582a6ca4538f8991d (diff)
downloadgdb-9227b5eb3d7250fbab15403782b3187f2b9e937c.zip
gdb-9227b5eb3d7250fbab15403782b3187f2b9e937c.tar.gz
gdb-9227b5eb3d7250fbab15403782b3187f2b9e937c.tar.bz2
From Tom Tromey <tromey@cygnus.com> and Keith Seitz <?>:
* minsyms.c: #include <ctype.h>, for msymbol_hash_iw. (compact_minimal_symbols): Added `objfile' argument. Put symbols in the objfile's hash table. (install_minimal_symbols): Put symbols in the objfile's demangled hash table. (lookup_minimal_symbol): Use hash table to find symbol in objfile. (msymbol_hash_iw, msymbol_hash, add_minsym_to_hash_table): New functions. (prim_record_minimal_symbol_and_info): Initialize the hash link fields of the new minimal symbol. * symtab.h (struct minimal_symbol): New fields `hash_next', `demangled_hash_next'. (msymbol_hash_iw, msymbol_hash, add_minsym_to_hash_table): Declare. * objfiles.h (MINIMAL_SYMBOL_HASH_SIZE): New define. (struct objfile): New fields `msymbol_hash', `msymbol_demangled_hash'.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 28d6e8e..efa1838 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -357,10 +357,21 @@ struct minimal_symbol
mst_file_bss /* Static version of mst_bss */
}
type BYTE_BITFIELD;
+
+ /* Minimal symbols with the same hash key are kept on a linked
+ list. This is the link. */
+
+ struct minimal_symbol *hash_next;
+
+ /* Minimal symbols are stored in two different hash tables. This is
+ the `next' pointer for the demangled hash table. */
+
+ struct minimal_symbol *demangled_hash_next;
};
#define MSYMBOL_INFO(msymbol) (msymbol)->info
#define MSYMBOL_TYPE(msymbol) (msymbol)->type
+
/* All of the name-scope contours of the program
@@ -1243,6 +1254,16 @@ extern CORE_ADDR find_stab_function_addr PARAMS ((char *,
struct objfile *));
#endif
+extern unsigned int
+msymbol_hash_iw PARAMS ((const char *));
+
+extern unsigned int
+msymbol_hash PARAMS ((const char *));
+
+extern void
+add_minsym_to_hash_table (struct minimal_symbol *sym,
+ struct minimal_symbol **table);
+
extern struct minimal_symbol *
lookup_minimal_symbol PARAMS ((const char *, const char *, struct objfile *));