public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: sami wagiaalla <swagiaal@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch] Change cplus_specific to an alocated struct
Date: Wed, 26 May 2010 16:55:00 -0000	[thread overview]
Message-ID: <4BFD440E.8080507@redhat.com> (raw)
In-Reply-To: <4BFD4230.3030600@redhat.com>

On 05/26/2010 11:45 AM, sami wagiaalla wrote:
> diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
> index 3b3894c..62e1251 100644
> --- a/gdb/ada-lang.c
> +++ b/gdb/ada-lang.c
> @@ -1142,32 +1142,32 @@ static struct htab *decoded_names_store;
>   char *
>   ada_decode_symbol (const struct general_symbol_info *gsymbol)
>   {
> -  char **resultp =
> -    (char **)&gsymbol->language_specific.cplus_specific.demangled_name;
> -  if (*resultp == NULL)
> +  char *result = symbol_get_cplus_demangled_name (gsymbol);
> +

Changed char **resultp to char *result since demangled_name no longer 
necessarily has an address. I didn't see why a pointer pointer was 
needed so I hope I am not missing anything. My guess was that it is an 
artifact left over from an earlier form of the function.


Also, both locations which call ada_decode_symbol (symbol_natural_name, 
and symbol_demangled_name) check before call the function 
cplus_specific.demangled_name. So, the check can perhaps be removed from 
either the caller or callee.

  reply	other threads:[~2010-05-26 16:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26 16:05 sami wagiaalla
2010-05-26 16:55 ` sami wagiaalla [this message]
2010-06-08 17:02 ` Tom Tromey
2010-06-14 19:29   ` sami wagiaalla
2010-06-15 22:56     ` Tom Tromey
2010-07-12 18:03       ` [patch 1/3] " sami wagiaalla
2010-07-13 17:16         ` Tom Tromey
2010-07-16 14:15           ` sami wagiaalla
2010-07-16 15:24             ` Tom Tromey
2010-07-12 18:06       ` [patch 2/3] " sami wagiaalla
2010-07-13 17:24         ` Tom Tromey
2010-07-16 14:15           ` sami wagiaalla
2010-07-12 18:08       ` [patch 3/3] " sami wagiaalla
2010-07-13 17:38         ` Tom Tromey
2010-07-16 14:15           ` sami wagiaalla
2010-07-16 15:29             ` Tom Tromey

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=4BFD440E.8080507@redhat.com \
    --to=swagiaal@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).