This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] struct dictionary
- From: David Carlton <carlton at math dot stanford dot edu>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb <gdb at sources dot redhat dot com>, Elena Zannoni <ezannoni at redhat dot com>, Jim Blandy <jimb at redhat dot com>
- Date: 24 Apr 2003 21:35:23 -0700
- Subject: Re: [rfc] struct dictionary
- References: <ro1he8y9pim.fsf@jackfruit.Stanford.EDU><3EA89AB3.6050403@redhat.com>
On Thu, 24 Apr 2003 22:17:23 -0400, Andrew Cagney <ac131313 at redhat dot com> said:
>> Blocks currently store symbols in one of three different ways:
>> using a hash table, using an unsorted list, or using a sorted list.
>> Most blocks are built by buildsym.c, which use only the former two
>> mechanisms. Sorted list blocks are only being produced by
>> mdebugread.c. And, to make matters worse, jv-lang.c produces one
>> unsorted list block for which the predicate BLOCK_SHOULD_SORT
>> matches; the chain of events by which GDB actually treats that
>> block correctly is very tenuous.
> Um, didn't BLOCK_SHOULD_SORT get deleted?
No. I tried in last fall, but Jim didn't like it because it probably
would have made performance for mdebugread be awful. Daniel recently
proposed hashing sorted blocks on the fly, but he withdrew that patch
quickly when he found a way to work around whatever problem caused him
to be particularly annoyed with sorted blocks.
Basically, either somebody needs to buildsym-ify mdebugread.c or else
symbol lookup has to be made a bit more abstract. These would
actually both be good ideas for reasons other than getting rid of
BLOCK_SHOULD_SORT, so it's certainly not an either-or choice.
David Carlton
carlton at math dot stanford dot edu