This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Fix partial symbol lookups
Michael Snyder <msnyder@redhat.com> writes:
> Daniel Berlin wrote:
>
> > Correct.
> > But this never worked since 1994 anyway, since psymbols have no
> > demangled name in them.
> > :)
>
> Good catch! I too remember the comments that imply that
> mangled names are in there, and have assumed they were true.
Mangled names are, demangled names aren't.
I think that's what you meant, I mix up the terms all the time.
I thought the same thing, until Peter pointed out I was wrong. :)
>
> >
> > I also corrected lookup_partial_symbol to binary search the global
> > table, regardless of language, since this is the part that had led me
> > to believe it had demangled names in it in the first place.
>
> Are you SURE that NO language puts mangled names in?
You mean demangled, and yes, i'm positive.
Sat Oct 8 04:27:21 1994 Peter Schauer
(pes@regent.e-technik.tu-muenchen.de)
Speed up GDB startup time by not demangling partial symbols.
* symfile.h (ADD_PSYMBOL_VT_TO_LIST),
symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
No longer demangle partial symbols.
* symtab.c (lookup_symbol, list_symbols): Handle mangled
variables, e.g. C++ static members, via the minimal symbols.
Since this happened, the only calls to SYMBOL_INIT_DEMANGLED_NAME is in
the symreaders, and only occur on full symbols.
> If so, then this should be a big improvement.
Yup.
>
> > Since we
> > only have a sorted list of mangled names in the global list, there is
> > no reason to linear search it, ever.
> > Statics still aren't sorted, so we linear search those.
>
> Hmmm -- so why not sort the statics?
Usually there aren't enough to matter, I believe.
I think that was the reasoning, anyway.
--Dan