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] minsyms.c: Fix switching to GNU v3 ABI


On Wed, Mar 10, 2004 at 04:54:50PM +0100, Corinna Vinschen wrote:
> On Mar 10 10:08, Daniel Jacobowitz wrote:
> > This is absolutely not what should happen.
> > 
> > prim_record_minimal_symbol_and_info:
> >   SYMBOL_SET_NAMES (msymbol, (char *)name, strlen (name), objfile);
> 
> Oops.  I didn't see that.
> 
> > symbol_set_names:
> >  ->  symbol_find_demangled_name
> >   if (gsymbol->language == language_cplus
> >       || gsymbol->language == language_auto)
> >     {
> >       demangled =
> >         cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI);
> >       if (demangled != NULL)
> >         {
> >           gsymbol->language = language_cplus;
> >           return demangled;
> >         }
> >     }
> > 
> > Please figure out why symbol_find_demangled_name has failed.  It sounds
> 
> It doesn't fail, at least not for the symbols which begin with "_Z".
> 
> > to me like you are having a problem with leading underscores, if I
> > remember my sh-elf-foo correctly.
> 
> Could you tell more about that?  I see a big bunch of symbols beginning
> with "__Z".  Is that what you mean?

Yes, precisely.  On sh-elf all symbols are prefixed with an underscore. 
I've been curious for a while about where, precisely, the leading
underscore is supposed to get stripped before we demangle; apparently,
the answer is "not early enough".

I'm not sure how we want to handle it.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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