This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add block['var'] accessor
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Christian Biesinger <cbiesinger at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 02 Aug 2019 10:01:12 +0300
- Subject: Re: [PATCH] Add block['var'] accessor
- References: <20190801223420.234581-1-cbiesinger@google.com>
> Date: Thu, 1 Aug 2019 17:34:20 -0500
> From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
> Cc: Christian Biesinger <cbiesinger@google.com>
>
> Currently we support iteration on blocks; this patch extends that to make
> subscript access work as well.
>
> gdb/ChangeLog:
>
> 2019-08-01 Christian Biesinger <cbiesinger@google.com>
>
> * NEWS: Mention dictionary access on blocks.
> * python/py-block.c (blpy_getitem): New function.
> (block_object_as_mapping): New struct.
> (block_object_type): Use new struct for tp_as_mapping field.
>
> gdb/doc/ChangeLog:
>
> 2019-08-01 Christian Biesinger <cbiesinger@google.com>
>
> * python.texi (Blocks In Python): Document dictionary access on blocks.
>
> gdb/testsuite/ChangeLog:
>
> 2019-08-01 Christian Biesinger <cbiesinger@google.com>
>
> * gdb.python/py-block.exp: Test dictionary access on blocks.
OK for the documentation parts, thanks.