Re: [rfc] struct dictionary

David Carlton
2003-04-25T04:35:31Z

On Thu, 24 Apr 2003 22:17:23 -0400, Andrew Cagney <ac131313@redhat.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@math.stanford.edu