This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: hash tables for msymbols


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++);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]