This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Python: fetch value when building gdb.Value object
On Oct 19, 2011, at 4:51 PM, Tom Tromey wrote:
>>>>>> "Paul" == Paul Koning <paulkoning@comcast.net> writes:
>
> Paul> At this point the change has been approved and committed (that
> Paul> happened before your comments arrived). So I guess we have a question
> Paul> of whether to change it back.
>
> Yes, I think so. I think the current approach is going to bite us
> later. We already have bugs open about bad memory management using
> gdb.Value.
Ok, I will work on that.
I think the exception handling fixes that were done recently takes care of the fact that some of the places where the lazy fetch exception could occur weren't correctly trapped inside Python. Then the other part will be a documentation change, to spell out clearly the fact that operating on a gdb.Value type can raise an exception at that time. For example, for a Value object v, the expression "v+1" can result in an exception (unlike what is usually true for Python variables of most types).
paul