This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Fix partial symbol lookups
- To: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- Subject: Re: [RFA]: Fix partial symbol lookups
- From: Daniel Berlin <dberlin at redhat dot com>
- Date: 16 Nov 2000 11:56:22 -0500
- Cc: msnyder at cygnus dot com, jimb at cygnus dot com, gdb-patches at sources dot redhat dot com, ezannoni at cygnus dot com
- References: <200011161629.RAA06158@reisser.regent.e-technik.tu-muenchen.de>
"Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de> writes:
> > > The previous version of lookup_partial_symbol (before your changes) would
> > > have found both mangled and demangled names.
> >
> > Now this I take issue with.
> > How could it possibly find demangled names, if it doesn't have access
> > to them?
> > lookup_partial_symbol didn't find demangled names before my patch on
> > 10-12. It doesn't have the code to do so, as you pointed out yourself
> > (because the SYMBOL_MATCHES_NAME is no better than the strcmp, since
> > we have no access to demangled names), unless the symbol name was the
> > demangled name, rather than the mangled name, which doesn't occur.
>
> Not true.
> There were no demangled names in partial symbols from most symbol readers,
> _except_ for the HP reader, which we are currently discussing, and which
> I discovered rather late in the day as well.
> Before your change, lookup_partial_symbol fell back to a linear search
> if it didn't find the symbol and had the chance to find the demangled symbol
> via SYMBOL_MATCHES_NAME during the linear search.
Peter, you are missing an important point.
*I* added that SYMBOL_MATCHES_NAME. Not HP. As the comment shows
right above it.
In the GDB-5.0 source, it's
while (STREQ (SYMBOL_NAME (*top), name))
{
if (SYMBOL_NAMESPACE (*top) == namespace)
{
return (*top);
}
top++;
}
So we couldn't have possibly been finding demangled names until I
added that, and since the HP code is older than the change to use
SYMBOL_MATCHES_NAME, they couldn't have had demangled names working in
partial symbol lookups.
--Dan