Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Paul Hilfinger <hilfingr@gnat.com>
Cc: jimb@redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA] Introduce notion of "search name"
Date: Wed, 12 May 2004 13:27:00 -0000	[thread overview]
Message-ID: <20040512132708.GA25122@nevyn.them.org> (raw)
In-Reply-To: <20040512105959.806E6F2DE4@nile.gnat.com>

On Wed, May 12, 2004 at 06:59:59AM -0400, Paul Hilfinger wrote:
> 
> > Unfortunately, discussion of that took over the thread, and you never
> > answered my last question about this patch:
> > 
> >  On Fri, Apr 02, 2004 at 03:29:55AM -0500, Paul Hilfinger wrote:
> >  > > What you did not explain is how [SYMBOL_DEMANGLED_SEARCH_NAME]                                      
> >  > > is supposed to be different from SYMBOL_SEARCH_NAME.                                                
> >  >                                                                                                       
> >  > Well, the direct answer is that for Ada,                                                              
> >  >       SYMBOL_DEMANGLED_SEARCH_NAME (sym) == NULL                                                      
> >  > whereas                                                                                               
> >  >       SYMBOL_SEARCH_NAME (sym) == the "linkage name" of the symbol                                    
> >  > Perhaps, now that you bring it up, it might be clearer simply to make                                 
> >  > this a predicate:                                                                                     
> >  >       SYMBOL_SEARCHED_BY_DEMANGLED_NAME (sym)                                                         
> >  > or something like that?                                                                               
> > 
> >  I don't think that either of those divisions is general enough to be
> >  useful.  Why should the search name have to be the linkage name or the
> >  demangled name?  For C++ there are two potential 'search names' - the
> >  name without DMGL_PARAMS, or just the basename.  Neither of these is
> >  the linkage or natural name.
> > 
> > I don't want us to proliferate name-related macros without a very clear
> > understanding of when each one is appropriate.
> 
> Daniel,
> 
> OK.  The only use for SYMBOL_SEARCHED_BY_DEMANGLED_NAME is to answer
> the question, "Do we need to index this minimal symbol under its
> demangled name?"  It would work to re-write the test in
> build_minimal_symbol_hash_tables as
> 
>       if (SYMBOL_SEARCH_NAME (msym) != SYMBOL_LINKAGE_NAME (msym))
> 	add_minsym_to_demangled_hash_table (msym,
>                                             objfile->msymbol_demangled_hash);
> 
> from the current
> 
>      if (SYMBOL_DEMANGLED_NAME (msym) != NULL)
> 	...
> 
> (although to use !=, you'd also want to document the fact that when
> SYMBOL_SEARCH_NAME is strcmp-equal to SYMBOL_LINKAGE_NAME, it is also
> pointer equal).  This re-write avoids introducing a new name, answering 
> one of your objections.  Furthermore, minimal symbols are searched for only
> by the linkage name or the search name (by definition), so it seems that the
> proposed test is correct.  
> 
> What do you think?

I like it!

-- 
Daniel Jacobowitz


  reply	other threads:[~2004-05-12 13:27 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-03 19:15 Paul Hilfinger
2004-03-19  0:09 ` Daniel Jacobowitz
2004-03-05  3:59   ` Daniel Jacobowitz
2004-03-05 10:39   ` Paul Hilfinger
2004-03-19  0:09     ` Paul Hilfinger
2004-03-31 22:12     ` Daniel Jacobowitz
2004-04-01 14:53       ` Jim Blandy
2004-04-01 15:00         ` Daniel Jacobowitz
2004-04-01 15:21           ` Jim Blandy
2004-04-02  9:30             ` Paul Hilfinger
2004-04-02 22:27               ` Jim Blandy
2004-04-03 12:04                 ` Paul Hilfinger
2004-04-06 14:37                   ` Jim Blandy
2004-04-02  9:33         ` Paul Hilfinger
2004-04-02  8:29       ` Paul Hilfinger
2004-04-09 22:40         ` Daniel Jacobowitz
2004-04-12  8:22           ` Paul Hilfinger
2004-04-16  4:11             ` Jim Blandy
2004-04-29 10:37               ` Paul Hilfinger
     [not found]                 ` <20040429211458.GB27523@nevyn.them.org>
     [not found]                   ` <vt2n04umj8b.fsf@zenia.home>
     [not found]                     ` <20040430084538.ECDE1F2E1C@nile.gnat.com>
     [not found]                       ` <20040430134955.GA15786@nevyn.them.org>
2004-05-03  8:49                         ` Paul Hilfinger
2004-05-11 19:48                           ` Daniel Jacobowitz
2004-05-12 11:00                             ` Paul Hilfinger
2004-05-12 13:27                               ` Daniel Jacobowitz [this message]
2004-05-12 14:14                                 ` Andrew Cagney
2004-05-12 14:23                                   ` Daniel Jacobowitz
2004-05-12 15:11                                     ` Andrew Cagney
2004-05-12 16:59                                       ` Joel Brobecker
2004-05-13 14:29                                         ` Andrew Cagney
2004-05-13  9:30                                   ` Paul Hilfinger
2004-05-13 13:49                                     ` Daniel Jacobowitz
2004-05-18 21:59                                     ` Jim Blandy
2004-05-19  9:55                                       ` Paul Hilfinger
2004-05-19 13:00                                         ` Daniel Jacobowitz
2004-05-19 15:21                                       ` Andrew Cagney
2004-05-20 10:18                                         ` Abstracting "name" Paul Hilfinger
2004-05-21 19:10                                           ` Andrew Cagney
2004-05-21 20:01                                             ` Jim Blandy
2004-03-19  0:09 ` [RFA] Introduce notion of "search name" Paul Hilfinger
2004-03-19  0:09 ` David Carlton
2004-03-03 19:26   ` David Carlton
2004-03-19  0:09   ` Paul Hilfinger
2004-03-04  8:45     ` Paul Hilfinger
2004-03-30  9:37 Paul Hilfinger

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=20040512132708.GA25122@nevyn.them.org \
    --to=drow@false.org \
    --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