public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Kévin Le Gouguec" <legouguec@adacore.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Clarify documentation for pretty_printer.child
Date: Tue, 21 May 2024 13:48:15 +0200	[thread overview]
Message-ID: <87frubo074.fsf@adacore.com> (raw)
In-Reply-To: <20240521111728.928069-1-tromey@adacore.com> (Tom Tromey's message of "Tue, 21 May 2024 05:17:28 -0600")

Tom Tromey <tromey@adacore.com> writes:

> An Ada pretty-printer had a bug where its 'child' method returned a
> gdb.Value rather than a tuple.  Kévin suggested that the documentation
> for this method could be improved to clarify this.
> ---
>  gdb/doc/python.texi | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
> index 4ca3ae4eca4..86ccc140c6d 100644
> --- a/gdb/doc/python.texi
> +++ b/gdb/doc/python.texi
> @@ -1869,8 +1869,9 @@ If available, this method should return the number of children.
>  This is not a basic method, so @value{GDBN} will only ever call it for
>  objects derived from @code{gdb.ValuePrinter}.
>  
> -If available, this method should return the child value indicated by
> -@var{n}.  Indices start at zero.
> +If available, this method should return the child item (that is, a
> +tuple holding the name and value of this child) indicated by @var{n}.
> +Indices start at zero.
>  @end defun
>  
>  @value{GDBN} provides a function which can be used to look up the

Thanks, I think that clear things up pretty well!

Reviewed-By: Kévin Le Gouguec <legouguec@adacore.com>

  reply	other threads:[~2024-05-21 11:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21 11:17 Tom Tromey
2024-05-21 11:48 ` Kévin Le Gouguec [this message]
2024-05-21 12:16 ` Eli Zaretskii

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=87frubo074.fsf@adacore.com \
    --to=legouguec@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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).