This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Patch: hash tables for msymbols
- To: Jim Blandy <jimb at cygnus dot com>
- Subject: Re: Patch: hash tables for msymbols
- From: Chris Faylor <cgf at cygnus dot com>
- Date: Fri, 3 Mar 2000 18:27:33 -0500
- Cc: tromey at cygnus dot com, gdb-patches at sourceware dot cygnus dot com
- References: <87aeowo9jq.fsf@cygnus.com> <npr9drfz3b.fsf@zwingli.cygnus.com>
On Fri, Mar 03, 2000 at 05:50:00PM -0500, Jim Blandy wrote:
>
>This looks good; please commit it to sourceware.
Note that Keith Seitz found a minor problem with Tom's hashing code while
investigating a problem reported by a Cygnus/Red Hat customer.
He came up with the following patch which should be included if Tom's
patch is finally applied to gdb sources. Tom, does this patch make sense?
I believe that Fred Fish has also come up with a similar "speedup" patch.
I don't know compares to Tom's, though.
cgf
*** gdb/minsyms.c.o Sun Feb 27 16:47:36 2000
--- gdb/minsyms.c Sun Feb 27 16:32:57 2000
*************** prim_record_minimal_symbol_and_info (nam
*** 635,640 ****
--- 635,646 ----
MSYMBOL_TYPE (msymbol) = ms_type;
/* FIXME: This info, if it remains, needs its own field. */
MSYMBOL_INFO (msymbol) = info; /* FIXME! */
+
+ /* The hash pointers must be cleared! If they're not,
+ MSYMBOL_HASH_ADD will NOT add this msymbol to the hash table. */
+ msymbol->hash_next = NULL;
+ msymbol->demangled_hash_next = NULL;
+
msym_bunch_index++;
msym_count++;
OBJSTAT (objfile, n_minsyms++);