This is the mail archive of the 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: [RFA] Python: PR/13327: expose laziness to Python

> From: Paul Koning <>
> Date: Tue, 25 Oct 2011 13:38:20 -0400
> Cc: Tom Tromey <>
> 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

> +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

> +@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.

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