This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA]: Fix partial symbol lookups


> 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 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.

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.

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]