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]
Other format: [Raw text]

Re: [RFA] Introduce notion of "search name"


On Mon, May 03, 2004 at 04:49:37AM -0400, Paul Hilfinger wrote:
> 
> Dan & Jim,
> 
> > This is not what I was talking about - I was suggesting
> > SYMBOL_DEMANGLED_NAME (symbol, objfile).  That's more mechanical work
> > but less confusing.
> 
> Ah.  Well, a quick scan of the sources indicates that there are a few
> places that ask for SYMBOL_PRINT_NAME in cases where it is not
> apparent where to find an objfile.  On the other hand, there are many
> other cases where there IS an objfile immediately to hand, so I
> suspect your design can be made to work.  It won't, of course, be a
> purely mechanical replacement.
> 
> > I don't care.  Go ahead without doing this if Jim's OK with the patch
> > otherwise.  I'll come back and fix it in a year or two if I ever run
> > out of memory leaks.
> 
> At the moment, I'd really like to concentrate on getting Ada support 
> turned on, and any leakage problems arising from these changes will affect
> only Ada users (who haven't complained about them in the last 7 years).  If 
> you can accept the patch largely as it is for now, I will undertake 
> to return to the objfile-finding problem after clearing my more immediate
> hurdles.
> 
> As an update, here is the most recent version of my "search-name" patch.
> 
> Thanks for your attention.

We've more or less consensused on ignoring the memory lifetime issue. 
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 Jacobowitz


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