Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Daniel Berlin <dberlin@redhat.com>
Cc: Jim Blandy <jimb@cygnus.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA]: Fix partial symbol lookups
Date: Wed, 15 Nov 2000 08:56:00 -0000	[thread overview]
Message-ID: <3A12C01A.659A@redhat.com> (raw)
In-Reply-To: <m3hf59izpl.fsf@dan2.cygnus.com>

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.

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

> 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?
From Peter.Schauer@regent.e-technik.tu-muenchen.de Wed Nov 15 10:17:00 2000
From: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
To: msnyder@redhat.com (Michael Snyder)
Cc: dberlin@redhat.com, jimb@cygnus.com, gdb-patches@sources.redhat.com, ezannoni@cygnus.com
Subject: Re: [RFA]: Fix partial symbol lookups
Date: Wed, 15 Nov 2000 10:17:00 -0000
Message-id: <200011151817.TAA05077@reisser.regent.e-technik.tu-muenchen.de>
References: <3A12C01A.659A@redhat.com>
X-SW-Source: 2000-11/msg00173.html
Content-length: 1616

> 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
From dberlin@redhat.com Wed Nov 15 10:43:00 2000
From: Daniel Berlin <dberlin@redhat.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: Jim Blandy <jimb@cygnus.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA]: Fix partial symbol lookups
Date: Wed, 15 Nov 2000 10:43:00 -0000
Message-id: <m3g0ktkrjh.fsf@dan2.cygnus.com>
References: <m3vgtqv60a.fsf@dan2.cygnus.com> <npbsvhzxm9.fsf@zwingli.cygnus.com> <m3hf59izpl.fsf@dan2.cygnus.com> <3A12C01A.659A@redhat.com>
X-SW-Source: 2000-11/msg00174.html
Content-length: 1753

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


       reply	other threads:[~2000-11-15  8:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3vgtqv60a.fsf@dan2.cygnus.com>
     [not found] ` <npbsvhzxm9.fsf@zwingli.cygnus.com>
     [not found]   ` <m3hf59izpl.fsf@dan2.cygnus.com>
2000-11-15  8:56     ` Michael Snyder [this message]
     [not found]       ` <m3g0ktkrjh.fsf@dan2.cygnus.com>
2000-11-15 11:19         ` Michael Snyder
     [not found] <m3snorj4d7.fsf@dan2.cygnus.com>
2000-11-16  8:29 ` Peter.Schauer
2000-11-16  8:44   ` Daniel Berlin
2000-11-16  9:06     ` Peter.Schauer
2000-11-16  9:16       ` Daniel Berlin
2000-11-16  8:56   ` Daniel Berlin
2000-11-16  9:02     ` Daniel Berlin
     [not found] <200011161222.NAA05985@reisser.regent.e-technik.tu-muenchen.de>
     [not found] ` <m38zqj3mcb.fsf@dan2.cygnus.com>
2000-11-16 11:01   ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A12C01A.659A@redhat.com \
    --to=msnyder@redhat.com \
    --cc=dberlin@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox