From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 397 invoked by alias); 4 Aug 2009 14:53:29 -0000 Received: (qmail 389 invoked by uid 22791); 4 Aug 2009 14:53:29 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Aug 2009 14:53:20 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 01D7C10ACE; Tue, 4 Aug 2009 14:53:19 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id D3B40108C6; Tue, 4 Aug 2009 14:53:18 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MYLOA-0008Ic-0g; Tue, 04 Aug 2009 10:53:18 -0400 Date: Tue, 04 Aug 2009 14:53:00 -0000 From: Daniel Jacobowitz To: Paul Pluzhnikov Cc: tromey@redhat.com, gdb@sourceware.org Subject: Re: Solibs and objfile BFD ownership Message-ID: <20090804145318.GA31664@caradoc.them.org> Mail-Followup-To: Paul Pluzhnikov , tromey@redhat.com, gdb@sourceware.org References: <20090728154001.GA19451@caradoc.them.org> <8ac60eac0907291656v13f568ebw4f3a2b9bb7c7223d@mail.gmail.com> <8ac60eac0908031749y59867374wa451d2f504483390@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ac60eac0908031749y59867374wa451d2f504483390@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00013.txt.bz2 On Mon, Aug 03, 2009 at 05:49:54PM -0700, Paul Pluzhnikov wrote: > Conveniently, 'struct bfd' has usrdata, which is unused in GDB. > Here is a stab at reference-counted sharing of BFDs between solib and > objfile. I can't see a better solution, so let's use this. A comment somewhere about the usage of the usrdata field would be nice. I gather that NULL and 1 behave the same? > + p_refcount = malloc (sizeof (*p_refcount)); xmalloc -- Daniel Jacobowitz CodeSourcery