[PATCH] Add block['var'] accessor

Eli Zaretskii eliz@gnu.org
Fri Aug 2 07:01:00 GMT 2019


> 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.



More information about the Gdb-patches mailing list