Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: David Carlton <carlton@math.stanford.edu>
To: Paul Hilfinger <hilfingr@gnat.com>
Cc: ezannoni@redhat.com, drow@mvista.com, cagney@redhat.com,
	gdb-patches@sources.redhat.com, jimb@redhat.com,
	brobecker@gnat.com
Subject: Re: [rfa] teach lookup_symbol about namespace scope
Date: Tue, 20 May 2003 16:17:00 -0000	[thread overview]
Message-ID: <ro1llx1egop.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <20030520111041.8AE9CF2CB5@nile.gnat.com>

On Tue, 20 May 2003 07:10:41 -0400 (EDT), Paul Hilfinger <hilfingr@gnat.com> said:

>> > 3. Linkage (mangled) names have the form 
>> >         <prefix>__<simple name><optional suffic>
>> >    and we need to be able to match this name given either
>> >    either <prefix>__<simple name> or <simple name>.  
>> 
>> I'm curious: how frequent is this optional suffix?  Because this looks
>> so simple that it seems like the time costs for demangling would be
>> very small: all you have to do is skip "prefix__" and then check for
>> the optional suffix (which I assume is easy to recognize?), and it
>> seems to me that other costs in building symbol information would
>> swamp that.  And we could design a scheme where, if the suffix was
>> absent, the mangled and demangled names would share memory, since the
>> demangled name is a final substring of the mangled name. 

> Sorry; I was unclear.  The MANGLED names have the form shown, but
> <prefix>__<simple name> is NOT the demangled name.  Binary operators
> get renamed and "." goes to "__".

I guess I'd been assuming/hoping that <simple name> was normally the
demangled name.  Binary operators don't worry me so much, but is "."
some sort of package/module/etc. operator that shows up all over the
place?  If so, I guess there's no way around making a copy.

>> Do Ada symbols have both the demangled and linkage name set?  Because
>> if you're never setting the demangled name, I would think that you
>> wouldn't have to use a special macro in the Ada case.  (By the way, we
>> used to have a different macro called SYMBOL_SEARCH_NAME, but that's a
>> separate issue.)

> I'm not sure which of your macros then would yield the right value for 
> all languages.  The idea was for SYMBOL_SEARCH_NAME to return the form 
> of name for a symbol that a specific language does searches on.  We still
> need SYMBOL_NATURAL_NAME and SYMBOL_PRINT_NAME to print out demangled
> forms of the name (which for Ada would involve a procedure call).  

Ah, interesting.  That does sound like a consistent and reasonable way
to do things, given your desire to not store demangled names.

Thanks for the info!

David Carlton
carlton@math.stanford.edu


  reply	other threads:[~2003-05-20 16:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-19  9:55 Paul Hilfinger
2003-05-19 16:35 ` David Carlton
2003-05-20 11:10   ` Paul Hilfinger
2003-05-20 16:17     ` David Carlton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-04-24 14:34 David Carlton
2003-04-24 20:14 ` Eli Zaretskii
2003-04-24 20:18 ` Daniel Jacobowitz
2003-04-24 20:44   ` David Carlton
2003-05-16 14:48     ` Elena Zannoni
2003-05-16 17:26       ` David Carlton
2003-05-16 19:49         ` Elena Zannoni
2003-05-16 20:51           ` David Carlton
2003-05-17  0:09             ` Joel Brobecker

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=ro1llx1egop.fsf@jackfruit.Stanford.EDU \
    --to=carlton@math.stanford.edu \
    --cc=brobecker@gnat.com \
    --cc=cagney@redhat.com \
    --cc=drow@mvista.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=hilfingr@gnat.com \
    --cc=jimb@redhat.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