aboutsummaryrefslogtreecommitdiff
path: root/gdb/dstread.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-07-11 20:46:19 +0000
committerDaniel Jacobowitz <drow@false.org>2002-07-11 20:46:19 +0000
commit261397f84f0369d189de8ddf4c331f282a59ed89 (patch)
treed1128ec86122474bb8fc28de99f4d902e3092e09 /gdb/dstread.c
parent7c1f909cd5369d517b431f176f33dc4aef79f4a7 (diff)
downloadgdb-261397f84f0369d189de8ddf4c331f282a59ed89.zip
gdb-261397f84f0369d189de8ddf4c331f282a59ed89.tar.gz
gdb-261397f84f0369d189de8ddf4c331f282a59ed89.tar.bz2
2002-07-11 Daniel Jacobowitz <drow@mvista.com>
Based on patch from Daniel Berlin <dberlin@dberlin.org>. * buildsym.c: Include "demangle.h" for SYMBOL_INIT_DEMANGLED_NAME. (finish_block) For non-function blocks, hash the symbol table. For function blocks, mark the symbol table as unhashed. * minsyms.c (msymbol_hash): Return hash value without taking modulus. (msymbol_hash_iw): Likewise. (add_minsym_to_hash_table): Take modulus of msymbol_hash's return value. (add_minsym_to_demangled_hash_table): Likewise for msymbol_hash_iw. (lookup_minimal_symbol): Likewise for both. * symtab.h (struct block): Add `hashtable' flag. Comment the hashtable. (BLOCK_HASHTABLE, BLOCK_BUCKETS, BLOCK_BUCKET): New macro. (ALL_BLOCK_SYMBOLS): Update. (BLOCK_SHOULD_SORT): Do not sort hashed blocks. (struct symbol): Add `hash_next' pointer. * symtab.c (lookup_block_symbol): Search using the hash table when possible. (find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS. (search_symbols, find_addr_symbol): Likewise. * dstread.c (process_dst_block): Clear hashtable bit for new block. (read_dst_symtab): Likewise. * jv-lang.c (get_java_class_symtab): Likewise. * mdebugread.c: Include "gdb_assert.h". (shrink_block): Assert that the block being modified is not hashed. * coffread.c (patch_opaque_types): Use ALL_BLOCK_SYMBOLS. * symmisc.c (free_symtab_block): Walk the hash table when freeing symbols. (dump_symtab): Recognize hashed blocks. * printcmd.c (print_frame_args): Assert that function blocks do not have hashed symbol tables. * ada-lang.c (symtab_for_sym): Use ALL_BLOCK_SYMBOLS. (fill_in_ada_prototype, debug_print_block): Likewise. (ada_add_block_symbols): Use ALL_BLOCK_SYMBOLS. Handle hash tables.
Diffstat (limited to 'gdb/dstread.c')
-rw-r--r--gdb/dstread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/dstread.c b/gdb/dstread.c
index abcce09..82e5e9c 100644
--- a/gdb/dstread.c
+++ b/gdb/dstread.c
@@ -1396,6 +1396,7 @@ process_dst_block (struct objfile *objfile, dst_rec_ptr_t entry)
symnum++;
}
BLOCK_NSYMS (block) = total_symbols;
+ BLOCK_HASHTABLE (block) = 0;
BLOCK_START (block) = address;
BLOCK_END (block) = address + size;
BLOCK_SUPERBLOCK (block) = 0;
@@ -1480,6 +1481,7 @@ read_dst_symtab (struct objfile *objfile)
(total_globals - 1) *
sizeof (struct symbol *));
BLOCK_NSYMS (global_block) = total_globals;
+ BLOCK_HASHTABLE (global_block) = 0;
for (symnum = 0; symnum < total_globals; symnum++)
{
nextsym = dst_global_symbols->next;