public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [python][patch] Inferior and Thread information support.
Date: Mon, 24 May 2010 18:06:00 -0000	[thread overview]
Message-ID: <83iq6dnpld.fsf@gnu.org> (raw)
In-Reply-To: <4BFA6E82.3070704@redhat.com>

> Date: Mon, 24 May 2010 13:18:10 +0100
> From: Phil Muldoon <pmuldoon@redhat.com>
> 
> 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.

  reply	other threads:[~2010-05-24 18:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 13:36 Phil Muldoon
2010-05-24 18:06 ` Eli Zaretskii [this message]
2010-06-10 18:40 ` Tom Tromey
2010-06-14 12:42   ` Phil Muldoon
2010-06-15 15:24     ` Pedro Alves
2010-06-15 18:11     ` Tom Tromey
2010-06-15 18:24       ` Pedro Alves
2010-06-15 19:58       ` Phil Muldoon
2010-06-15 20:36         ` Pedro Alves
2010-06-18  6:49   ` Phil Muldoon
2010-06-18 14:21     ` Doug Evans
2010-06-18 15:47       ` Phil Muldoon
2010-06-18 17:59         ` Tom Tromey
2010-06-18 20:10           ` Phil Muldoon
2010-06-25 20:41             ` Tom Tromey
2010-06-18 18:04     ` Tom Tromey
2010-06-22 10:32       ` Phil Muldoon
2010-06-25 20:38         ` Tom Tromey
2010-06-28  9:22           ` Phil Muldoon
2010-06-28 19:51             ` Tom Tromey
2010-06-28 21:35               ` Phil Muldoon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83iq6dnpld.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).