Python convenience functions that return GDB values cause segfault
Daniel Jacobowitz
drow@false.org
Wed Feb 4 20:43:00 GMT 2009
On Wed, Feb 04, 2009 at 11:06:04AM -0700, Tom Tromey wrote:
> >>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> 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.
--
Daniel Jacobowitz
CodeSourcery
More information about the Archer
mailing list