This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Solibs and objfile BFD ownership
- From: Daniel Jacobowitz <drow at false dot org>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: tromey at redhat dot com, gdb at sourceware dot org
- Date: Tue, 4 Aug 2009 10:53:18 -0400
- Subject: Re: Solibs and objfile BFD ownership
- References: <20090728154001.GA19451@caradoc.them.org> <8ac60eac0907291656v13f568ebw4f3a2b9bb7c7223d@mail.gmail.com> <m33a8ervt1.fsf@fleche.redhat.com> <8ac60eac0908031749y59867374wa451d2f504483390@mail.gmail.com>
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