This is the mail archive of the
mailing list for the Archer project.
Re: [RFC] Proposal for a new DWARF name index section
>>>>> "Dodji" == Dodji Seketeli <email@example.com> writes:
Tom> The other problem I've noticed is name canonicalization. This past
Tom> year, we changed gdb to canonicalize names in its symbol tables, and to
Tom> canonicalize user input before doing lookups. This lets gdb return the
Tom> right answer even when the order of modifiers varies. This change
Tom> slowed down DWARF reading, and it occurred to me that it would also
Tom> substantially slow down index reading. So, I would also like to change
Tom> the .debug_gnu_index spec to specify how names are to be canonicalized.
Dodji> Just to be sure I understand. How saying _how_ the strings are to be
Dodji> canonicalized is going to speed up significantly GDB's processing?
Dodji> I would have have thought that the killer gain would come from the
Dodji> producing directly what the consumer expects. I guess I am missing
The producer and consumer need to agree on the format. The best way to
do that is define what the format actually is.
GDB must canonicalize names in order to do lookups in a sane way. E.g.,
see: http://sourceware.org/bugzilla/show_bug.cgi?id=8617. So, GDB
applies the same canonicalization to the names coming from DWARF, and to
the names the user enters. Then it can do simple string comparisons to
find names. But, GDB does not actually care about most details of this
As a practical matter I would assume that we would define the canonical
form to conveniently align with our already-existing code.
Maybe this is all really wrong-headed, though, and it would be better to
change gdb to have a structured symbol table. I haven't really
considered this approach much.