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: [RFA] Demangled minsym hash table broken


On Wed, Mar 29, 2000 at 07:50:24PM -0500, Daniel Berlin wrote:
>I was trying to debug a bug report, and in the process, noticed that
>the demangled minsym hash table is broken (I noticed because we
>weren't finding a symbol we should have been able to find).
>Since add_minsym_to_hashtable only uses minsym_hash, and the code
>adding to the demangled minsym hashtable is using that function, the
>symbols never get the right hash value, because they need to use
>minsym_hash_iw.
>The lookups properly use that function.
>
>My fix is to add an extra parameter to add_minsym_to_hashtable so we
>can tell the function whether we are adding a mangled or demangled
>symbol, and thus, it can pick the right bucket.
>Also, i made it set the proper next as well (we need to set
>sym->demangled_hash_next if it's a demangled symbol).
>
>So up until now, the demangled symbol table was never working, as i
>had suspected.

Peter Schauer submitted a patch a while ago when he discovered this.

It's here:  http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00869.html

I don't know if your patch is similar but we should probably go with the
simplest solution...

cgf

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