Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: Adam Fedor <fedor@doc.com>, GDB Patches <gdb-patches@sources.redhat.com>
Subject: Re: [RFA] Demangle ObjC symbols in symtab.c [4/5]
Date: Tue, 07 Jan 2003 23:14:00 -0000	[thread overview]
Message-ID: <20030107231403.GE20617@nevyn.them.org> (raw)
In-Reply-To: <15897.63800.544503.672211@localhost.redhat.com>

On Mon, Jan 06, 2003 at 04:46:32PM -0500, Elena Zannoni wrote:
> Adam Fedor writes:
>  > 2003-01-03  Adam Fedor  <fedor@gnu.org>
>  > 
>  > 	* symtab.c (symbol_init_demangled_name): Check for and demangle
>  > 	ObjC symbols.
>  > 	(make_symbol_completion_list): Look for ObjC symbols
>  > 
>  > Index: symtab.c
>  > ===================================================================
>  > RCS file: /cvs/src/src/gdb/symtab.c,v
>  > retrieving revision 1.84
>  > diff -u -p -r1.84 symtab.c
>  > --- symtab.c	2 Jan 2003 14:27:26 -0000	1.84
>  > +++ symtab.c	3 Jan 2003 03:20:14 -0000
>  > @@ -440,8 +440,18 @@ void
>  >  symbol_init_demangled_name (struct general_symbol_info *gsymbol,
>  >                              struct obstack *obstack)
>  >  {
>  > -  char *mangled = gsymbol->name;
>  > -  char *demangled = NULL;
>  > -
>  >    if (gsymbol->language == language_unknown)
>  >      gsymbol->language = language_auto;
>  > +
>  > +  if (gsymbol->language == language_objc
>  > +      || gsymbol->language == language_auto)
>  > +    {
>  > +      char *demangled =
>  > +	objc_demangle (gsymbol->name);
>  > +      if (demangled != NULL)
>  > +	{
>  > +	  gsymbol->language = language_objc;
>  > +	  gsymbol->language_specific.objc_specific.demangled_name =
>  > +	    obsavestring (demangled, strlen (demangled), (obstack));
>  > +	  xfree (demangled);
> 
> 
>  > +	}+
>        ^^^^ ??? I assume it's a cut/paste typo.
> 
>  > 
>  > +      else
>  > +	{
>  > +	  gsymbol->language_specific.objc_specific.demangled_name = NULL;
>  > +	}
>  > +    }
>  > +  
>  >    if (gsymbol->language == language_cplus
>  >        || gsymbol->language == language_auto)
>  >      {
>  > -      demangled =
>  > +      char *demangled =
>  >          cplus_demangle (gsymbol->name, DMGL_PARAMS | DMGL_ANSI);
>  >        if (demangled != NULL)
>  >          {
>  > @@ -462,9 +478,10 @@ symbol_init_demangled_name (struct gener
>  >            gsymbol->language_specific.cplus_specific.demangled_name = NULL;
>  >          }
>  >      }
>  > +
>  >    if (gsymbol->language == language_java)
>  >      {
>  > -      demangled =
>  > +      char *demangled =
>  >          cplus_demangle (gsymbol->name,
>  >                          DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA);
>  >        if (demangled != NULL)
>  > @@ -479,6 +496,9 @@ symbol_init_demangled_name (struct gener
>  >            gsymbol->language_specific.cplus_specific.demangled_name = NULL;
>  >          }
>  >      }
>  > +
>  > +  if (gsymbol->language == language_auto)
>  > +    gsymbol->language = language_unknown;
> 
> Why this? There was a (kind of a) rationale on setting the language to
> auto, to speed up some searches. There was a controversy about that
> too, and it never got resolved. Do the current C++ people have an opinion?
> 
> See:
> http://sources.redhat.com/ml/gdb-patches/2000-09/msg00241.html
> 
> and
> http://sources.redhat.com/ml/gdb-patches/2000-10/msg00251.html

Well, I'm discussing (off-list) ways to prevent this function from
being called multiple times; I haven't worked out how they interact
with the file's language yet, however.  I need to investigate that some
more.

I don't like the set back to unknown very much, in principle.  And
whatever problem Dan was discussing in the messages above appears to be
gone, or at least worked around somewhere else.


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-01-07 23:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-03 23:03 Adam Fedor
2003-01-04  1:25 ` Michael Snyder
2003-01-11  4:01   ` Adam Fedor
2003-02-19 14:59     ` Elena Zannoni
2003-02-19 15:15       ` Elena Zannoni
2003-02-19 16:48         ` Adam Fedor
2003-01-06 21:42 ` Elena Zannoni
2003-01-07 23:14   ` Daniel Jacobowitz [this message]
2003-01-11  3:59   ` Adam Fedor
2003-01-11  5:24     ` Daniel Jacobowitz

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=20030107231403.GE20617@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ezannoni@redhat.com \
    --cc=fedor@doc.com \
    --cc=gdb-patches@sources.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