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: 15 Nov 2000 15:34:33 -0500
- Cc: msnyder at redhat dot com (Michael Snyder), jimb at cygnus dot com, gdb-patches at sources dot redhat dot com, ezannoni at cygnus dot com
- References: <200011151817.TAA05077@reisser.regent.e-technik.tu-muenchen.de>
"Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de> 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.
>
> They were not true from 1994 - Dec 1998 and I should be blamed that I
> didn't remove the code and comment when I removed the demangling of
> partial symbols back in 1994, my sincere apologies.
>
> > > 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?
> > If so, then this should be a big improvement.
>
> I just double checked once again.
> add_psymbol_to_list (which is used by most symbol readers) calls
> SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language), which sets the demangled
> name to NULL.
>
> But wait, the HP patches reintroduced the demangling of partial symbols
> for their symbol reader (look for add_psymbol_with_dem_name_to_list).
This shouldn't make a difference, unless it's using the demangled name
as the symbol name, rather than using SYMBOL_INIT_DEMANGLED_NAME (IE
the right way is so the demangled name is the demangled name, the symbol name is the
mangled name)
>
> This is really bad, as GDB now has to cope with the presence and non-presence
> of demangling in partial symbols. I'd be very reluctant to reintroduce
> the demangling of partial symbols for all other symbol readers, instead
> someone should fix the HP reader to not need the demangling of partial
> symbols.
It shouldn't.
>
> I am now afraid that we have to back out all 2000-10-12 Dan Berlin changes,
> to get a reliably working (and perhaps sometimes slower) GDB again.
>
No, we don't.
Unless they are using the demangled name as the symbol name, which is
incorrect anyway.
As long as they have the mangled name, it'll be found in a partial
symbol lookup just the same as it would be found elsewhere.
IE it won't find more or less symbols than it would using any other
debug format.
> --
> Peter Schauer pes@regent.e-technik.tu-muenchen.de