This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[RFA] Demangled minsym hash table broken
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [RFA] Demangled minsym hash table broken
- From: dan at cgsoftware dot com (Daniel Berlin)
- Date: 29 Mar 2000 19:50:24 -0500
- Reply-To: dan at cgsoftware dot com
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.
--Dan