From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29241 invoked by alias); 24 May 2010 18:04:41 -0000 Received: (qmail 29086 invoked by uid 22791); 24 May 2010 18:04:39 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_50,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 May 2010 18:04:32 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L2X00400RAIWC00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Mon, 24 May 2010 21:04:30 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.221.110]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L2X0027MRJF67A0@a-mtaout20.012.net.il>; Mon, 24 May 2010 21:04:28 +0300 (IDT) Date: Mon, 24 May 2010 18:06:00 -0000 From: Eli Zaretskii Subject: Re: [python][patch] Inferior and Thread information support. In-reply-to: <4BFA6E82.3070704@redhat.com> To: Phil Muldoon Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83iq6dnpld.fsf@gnu.org> References: <4BFA6E82.3070704@redhat.com> 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: 2010-05/txt/msg00550.txt.bz2 > Date: Mon, 24 May 2010 13:18:10 +0100 > From: Phil Muldoon > > This patch adds Python support to inferiors and threads. Thanks. A few comments about the documentation parts: > +@node Inferiors In Python > +@subsubsection Inferiors In Python It is usually a good idea to have a @cindex entry at the beginning of a section whose name is identical to the section name (except all lower-case). > +Programs which are being run under @value{GDBN} are called inferiors > +(@pxref{Inferiors and Programs}). Python scripts can access > +information about and manipulate inferiors controlled by @value{GDBN} > +via objects of the @code{gdb.Inferior} class. This should probable have a @findex entry for gdb.Inferior. > +@defmethod Inferior threads > +This method returns a tuple holding all the threads which are valid > +when it is called. If there are no valid threads, the method will > +return an empty list. Are "list" and "tuple" synonyms in Python? If not, perhaps this needs a slight rewording. > +@defmethod Inferior read_memory @var{address} @var{length} I don't think you need @var around the arguments of this method (or any other methods in the patch). You only need @var if an argument includes characters treated specially by Texinfo. > +Write the contents of @var{buffer} (a Python object which supports the > +buffer protocol, i.e., a string, an array or the object returned from > +@code{gdb.read_memory}) to the inferior, starting at @var{address}. I wonder whether a buffer object warrants a separate short description which is not in parens in the middle of describing a method. > +@defmethod Inferior search_memory @var{address} @var{length} @var{pattern} @r{[}@var{size}@r{]} @r{[}@var{max_count}@r{]} > +Search a region of the inferior memory starting at @var{address} with the > +given @var{length}. @var{pattern} can be a string, a byte array, a buffer > +object, a number, a @code{gdb.Value} object (@pxref{Values From Inferior}) > +or a list or tuple with elements in any combination of those types. The semantics of tuple or list as PATTERN is not explained here. > If @var{size} is > +zero or not specified, it is taken from the value's type in the current > +language. What does this mean if PATTERN is a tuple or a list? > This is useful when one wants to specify the search pattern as > +a mixture of types. Is "mixture of types" intended to cover the list/tuple case? If so, I suggest to use identical words, to minimize the chance of confusing the reader with terminology that is never explained. > +@node Threads In Python > +@subsubsection Threads In Python See the comment above regarding a @cindex entry here. > +Python scripts can access information about, and manipulate inferior threads > +controlled by @value{GDBN}, via objects of the @code{gdb.InferiorThread} class. And @findex here regarding gdb.InferiorThread. > +@defivar InferiorThread num > +ID of the thread, as assigned by GDB. ^^^ @value{GDBN}. Okay with those changes. In addition, I think we need a NEWS entry for these features. Thanks.