This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Python: PR/13327: expose laziness to Python
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Paul Koning <paulkoning at comcast dot net>
- Cc: gdb-patches at sourceware dot org, tromey at redhat dot com
- Date: Tue, 25 Oct 2011 20:16:27 +0200
- Subject: Re: [RFA] Python: PR/13327: expose laziness to Python
- References: <B920A763-3B1E-426E-9054-E1C6F020626D@comcast.net>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Paul Koning <paulkoning@comcast.net>
> Date: Tue, 25 Oct 2011 13:38:20 -0400
> Cc: Tom Tromey <tromey@redhat.com>
>
> The documentation briefly touches on how lazy fetching works in the discussion of the is_lazy attribute, but it doesn't more fully discuss it as a topic of its own. I could try to do so, in the introductory material for gdb.Value. Should I do that?
No, I think what you wrote is good enough.
> Ok to commit?
A few comments to the documentation part:
> +@defvar Value.is_lazy
> +This read-only boolean attribute is true if the value has not yet
"The attribute is true" sounds weird, doesn't it? How about
The value of this read-only attribute is @code{True} if @code{Value}
has not yet been fetched ...
> +been fetched from the inferior. GDB does not fetch values until
^^^
@value{GDBN}
> +necessary, for efficiency. For example:
> +
> +@smallexample
> +myval = gdb.parse_and_eval ('somevar')
> +@end smallexample
> +
> +The value of @var{somevar} is not fetched at this time. It will be
@code{somevar}, not @var. "somevar" does not stand for some symbol,
it's the symbol itself.
> +fetched when the value is needed, or when the @code{fetch_lazy ()}
> +method is invoked.
@code{fetch_lazy}, please, without the parens. "fetch_lazy()" looks
like a call to the method with no arguments, which is not what you
want.
> +@defun Value.fetch_lazy ()
> +If the @code{gdb.Value} object is currently a lazy value
> +(@code{gdb.Value.is_lazy} is @code{True}) then the value is
^
Comma after the right parenthesis.
Okay with these changes.