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

Yes, that's what I meant.  ;-(

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

Ah, but now Peter points out that this might not be true for HP.

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

That's not good reasoning.  How many there are
depends solely on programmer's style.  How difficult
would it be to sort the list and search it sensably?
Seems like except for the initial investment of implementing
it, this would be a win for complexity, since globals and
statics would no longer have to be handled differently.

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