From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20815 invoked by alias); 25 Oct 2011 18:16:47 -0000 Received: (qmail 20658 invoked by uid 22791); 25 Oct 2011 18:16:46 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Oct 2011 18:16:25 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LTM00L00VZKN600@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Tue, 25 Oct 2011 20:16:21 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.212.197]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LTM00KNXW38GSE0@a-mtaout22.012.net.il>; Tue, 25 Oct 2011 20:16:21 +0200 (IST) Date: Tue, 25 Oct 2011 18:24:00 -0000 From: Eli Zaretskii Subject: Re: [RFA] Python: PR/13327: expose laziness to Python In-reply-to: To: Paul Koning Cc: gdb-patches@sourceware.org, tromey@redhat.com Reply-to: Eli Zaretskii Message-id: <83fwihc4xw.fsf@gnu.org> References: X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00670.txt.bz2 > 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 ^^^ @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.