This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Solibs and objfile BFD ownership


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]