binutils-gdb/gdb/python
Christian Biesinger 0b27c27d0d Add block['var'] accessor
Currently we support iteration on blocks; this patch extends that to make
subscript access work as well.

gdb/ChangeLog:

2019-08-05  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-05  Christian Biesinger  <cbiesinger@google.com>

	* python.texi (Blocks In Python): Document dictionary access on blocks.

gdb/testsuite/ChangeLog:

2019-08-05  Christian Biesinger  <cbiesinger@google.com>

	* gdb.python/py-block.exp: Test dictionary access on blocks.
2019-08-05 13:06:18 -05:00
..
lib/gdb
py-all-events.def
py-arch.c
py-auto-load.c
py-block.c Add block['var'] accessor 2019-08-05 13:06:18 -05:00
py-bpevent.c
py-breakpoint.c "catch catch/throw/rethrow", breakpoint -> catchpoint 2019-07-09 19:34:18 +01:00
py-cmd.c
py-continueevent.c
py-event-types.def
py-event.c
py-event.h
py-events.h
py-evtregistry.c
py-evts.c
py-exitedevent.c
py-finishbreakpoint.c
py-frame.c
py-framefilter.c Implement 'set print frame-info|frame-arguments presence'. 2019-07-29 21:42:29 +02:00
py-function.c
py-gdb-readline.c
py-inferior.c Fix use-after-move bug in add_thread_object 2019-07-11 09:15:18 -06:00
py-infevents.c
py-infthread.c Reduce manual reference counting in py-inferior.c 2019-07-10 12:24:22 -06:00
py-instruction.c
py-instruction.h
py-lazy-string.c
py-linetable.c
py-newobjfileevent.c
py-objfile.c Add Objfile.lookup_{global,static}_symbol functions 2019-07-29 20:44:08 -05:00
py-param.c
py-prettyprint.c
py-progspace.c
py-record-btrace.c Don't include gdbarch.h from defs.h 2019-07-10 14:53:53 -06:00
py-record-btrace.h
py-record-full.c
py-record-full.h
py-record.c
py-record.h
py-ref.h Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c [PR/24474] Add gdb.lookup_static_symbol to the python API 2019-07-30 11:04:37 -05:00
py-symtab.c
py-threadevent.c
py-type.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
py-unwind.c
py-utils.c
py-value.c
py-varobj.c
py-xmethods.c
python-config.py
python-internal.h [PR/24474] Add gdb.lookup_static_symbol to the python API 2019-07-30 11:04:37 -05:00
python.c [PR/24474] Add gdb.lookup_static_symbol to the python API 2019-07-30 11:04:37 -05:00
python.h