From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Document array indexing for Python gdb.Value
Date: Tue, 18 Jul 2023 19:26:15 +0300 [thread overview]
Message-ID: <83v8eh5gpk.fsf@gnu.org> (raw)
In-Reply-To: <20230718143935.4002759-1-tromey@adacore.com> (message from Tom Tromey via Gdb-patches on Tue, 18 Jul 2023 08:39:35 -0600)
> Cc: Tom Tromey <tromey@adacore.com>
> Date: Tue, 18 Jul 2023 08:39:35 -0600
> From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
>
> I noticed that the documentation for gdb.Value doesn't mention array
> indexing.
> ---
> gdb/doc/python.texi | 7 +++++++
> 1 file changed, 7 insertions(+)
Thanks.
> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
> index 9a342f34bf0..aeff483dc0d 100644
> --- a/gdb/doc/python.texi
> +++ b/gdb/doc/python.texi
> @@ -831,6 +831,13 @@ structure, then @code{bar} can also be accessed as follows:
> bar = some_val[foo_field]
> @end smallexample
>
> +If a @code{gdb.Value} has array or pointer type, an integer can be
> +used to access elements.
> +
> +@smallexample
> +result = some_array[23]
> +@end smallexample
> +
"An integer" or "an index"?
Approved-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2023-07-18 16:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 14:39 Tom Tromey
2023-07-18 16:26 ` Eli Zaretskii [this message]
2023-07-21 15:47 ` Tom Tromey
2023-07-21 15:53 ` 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=83v8eh5gpk.fsf@gnu.org \
--to=eliz@gnu.org \
--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).