This is the mail archive of the
mailing list for the GDB project.
Re: partial-symtab symbol sorting
>>>>> "Pierre" == Pierre Muller <email@example.com> writes:
Pierre> Did you think about what would happen to executables containing
Pierre> objects compiled in different languages, each having a different sorting
Pierre> I don't understand how this would work in such a case?
The symbols in a psymtab are specific to that particular psymtab.
In DWARF terms this corresponds to a single CU, so it just has one
language (ignoring possible future confusion via LTO builds).
See, e.g., psympriv.h:struct partial_symtab:globals_offset.
I tend to think this is a weird design and that we should have a single
hash per objfile for looking up partial symbols. But I have never tried
to measure the slowdown, if any, and of course this sort of change has
its own possible flaws... just something for a future to-do list.
Speaking of weird design, anybody know why globals are sorted in a
psymtab and static symbols are not? The comment in psympriv.h doesn't
make sense to me, since it ignores the possibility of an unsuccessful