From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31366 invoked by alias); 1 Mar 2006 21:02:11 -0000 Received: (qmail 31356 invoked by uid 22791); 1 Mar 2006 21:02:10 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Mar 2006 21:02:09 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id k21L269L030846 for ; Wed, 1 Mar 2006 16:02:06 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k21L26131220 for ; Wed, 1 Mar 2006 16:02:06 -0500 Received: from localhost.localdomain (vpn50-89.rdu.redhat.com [172.16.50.89]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id k21L26sa012812 for ; Wed, 1 Mar 2006 16:02:06 -0500 Received: from ironwood.lan (ironwood.lan [192.168.64.8]) by localhost.localdomain (8.12.11/8.12.10) with ESMTP id k21L44fL006943 for ; Wed, 1 Mar 2006 14:04:04 -0700 Date: Wed, 01 Mar 2006 21:02:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: Re: [RFA] hpread.c cleanups Message-ID: <20060301140205.72d80f1a@ironwood.lan> In-Reply-To: <4405380F.2090202@tausq.org> References: <4405380F.2090202@tausq.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00019.txt.bz2 On Wed, 01 Mar 2006 13:58:39 +0800 Randolph Chung 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