This is the mail archive of the
mailing list for the Archer project.
Re: Python convenience functions that return GDB values causesegfault
On Wed, Feb 04, 2009 at 11:06:04AM -0700, Tom Tromey wrote:
> >>>>> "Thiago" == Thiago Jung Bauermann <firstname.lastname@example.org> writes:
> Thiago> I think it's better to return a copy of the value.
> Yeah, I agree.
> This thread, plus Paul's value-related memory leak note, makes me
> wonder whether we ought to try to implement reference counting for
> struct value. It seems like a big project, though.
Shouldn't be... and Pedro has a helpful patch for you. It's tucked
away in "[1/2] Inspect extra signal information". It adds a closure
to values and callbacks to copy and free it.