This is the mail archive of the gdb-patches@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: Python: fetch value when building gdb.Value object


On Oct 20, 2011, at 11:03 AM, Tom Tromey wrote:

> Tom> Yes, I think so.  I think the current approach is going to bite us
> Tom> later.  We already have bugs open about bad memory management using
> Tom> gdb.Value.
> 
> Paul> Ok, I will work on that.
> 
> Thanks.
> 
> Paul> Then the other part will be a documentation change, to spell out
> Paul> clearly the fact that operating on a gdb.Value type can raise an
> Paul> exception at that time.  For example, for a Value object v, the
> Paul> expression "v+1" can result in an exception (unlike what is
> Paul> usually true for Python variables of most types).
> 
> Yes, that sounds good.
> 
> Also, we can expose the laziness directly to Python.  I filed a PR for
> this:
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=13327

I can make that part of the change.

How about an attribute "is_lazy", which reads as True or False, and can be set to False (but not to other values)?

	paul


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