Solibs and objfile BFD ownership

Daniel Jacobowitz drow@false.org
Tue Aug 4 14:53:00 GMT 2009


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



More information about the Gdb mailing list