From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24195 invoked by alias); 26 Sep 2008 09:30:01 -0000 Received: (qmail 24185 invoked by uid 22791); 26 Sep 2008 09:30:00 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout1.012.net.il (HELO mtaout1.012.net.il) (84.95.2.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 26 Sep 2008 09:29:20 +0000 Received: from HOME-C4E4A596F7 ([77.127.170.116]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K7S000STQCT8Y20@i-mtaout1.012.net.il> for gdb-patches@sources.redhat.com; Fri, 26 Sep 2008 12:29:18 +0300 (IDT) Date: Fri, 26 Sep 2008 09:30:00 -0000 From: Eli Zaretskii Subject: Re: [rfc] expose gdb values to python In-reply-to: X-012-Sender: halo1@inter.net.il To: Thiago Jung Bauermann Cc: gdb-patches@sources.redhat.com Reply-to: Eli Zaretskii Message-id: References: <1221199426.24580.26.camel@localhost.localdomain> <20080921042657.GB29631@caradoc.them.org> <20080925114659.GA30878@caradoc.them.org> 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: 2008-09/txt/msg00513.txt.bz2 > From: Thiago Jung Bauermann > Date: Thu, 25 Sep 2008 22:59:26 -0300 > > gdb/doc/ > * gdb.texinfo. (Values From Inferior): New subsubsection. This part is approved with a few comments, see below. > +@node Values From Inferior > +@subsubsection Values From Inferior Please add some @cindex entry/entries here, which would be useful for someone who will look for this stuff via the index. > +@value{GDBN} provides values it obtains from the inferior program in an > +object of type @code{gdb.Value}. This object keeps track of information > +related to the value such as its type, the address where it is kept in > +the inferior, and so on. My assumption in reviewing Python-related manual sections is that the reader will generally _not_ be a proficient Python programmer, but rather someone who programs in another language, like C++ or Ada, and whose use of Python in GDB is just so to get away with whatever scripting the reader needs to craft for her current needs. With that in mind, I think we should have as much examples and specific concrete information in these sections as possible, to make it easier for the reader to understand how to use these features without too many detours into Python manuals. Abstract information, such as references to Python types, will not alone reach that goal. For example, in the above paragraph, would it help to describe the specific elements and methods of `gdb.Value', or give a couple of examples of their use in real life? You mention the type and address of the inferior's value, but are there other useful members that the reader would want to know about? And even for these 2, what kind of data types are they? > +The following method is provided: > + > +@defmethod Value dereference > +If the @code{gdb.Value} object is of a pointer type, you can dereference > +it using the @code{dereference} method. This gives you a new > +@code{gdb.Value} object for the pointed-to contents. > +@end defmethod Again, a practical example of using this would be good to have. Thanks.