Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] hpread.c cleanups
Date: Wed, 01 Mar 2006 21:02:00 -0000	[thread overview]
Message-ID: <20060301140205.72d80f1a@ironwood.lan> (raw)
In-Reply-To: <4405380F.2090202@tausq.org>

On Wed, 01 Mar 2006 13:58:39 +0800
Randolph Chung <randolph@tausq.org> wrote:

> @@ -5764,13 +5765,9 @@ hpread_process_one_debug_symbol (union d
>  	       */
>  	      struct so_list *so;
>                struct hppa_objfile_private *priv;
> +	      struct target_so_ops *ops = current_target_so_ops;
>  
> -              priv = (struct hppa_objfile_private *)
> -	        objfile_data (objfile, hppa_objfile_priv_data);
> -	      if (priv == NULL)
> -		error (_("Internal error in reading shared library information."));
> -
> -	      so = ((struct hppa_objfile_private *) priv)->so_info;
> +	      so = ops->current_sos ();
>  	      if (so == NULL)
>  		error (_("Internal error in reading shared library information."));

I don't think it's a good idea to call current_sos() here.  Could you
try calling master_so_list() instead?  (It's declared in solist.h.)

The problem with calling current_sos() is 1) it's slow since it hits
target memory, and 2) you haven't freed the storage allocated by calling
current_sos().  If you find that you really need current_sos() for some
reason, you should add some code to deallocate the storage when you're
done with it.

Kevin


      parent reply	other threads:[~2006-03-01 21:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-01  5:58 Randolph Chung
2006-03-01 17:30 ` Daniel Jacobowitz
2006-03-27  0:35   ` Randolph Chung
2006-03-01 21:02 ` Kevin Buettner [this message]

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=20060301140205.72d80f1a@ironwood.lan \
    --to=kevinb@redhat.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