binutils-gdb/gdb/python
Andrew Burgess 64cb3757a9 gdb/python: New method to access list of register groups
Add a new method gdb.Architecture.register_groups which returns a new
object of type gdb.RegisterGroupsIterator.  This new iterator then
returns objects of type gdb.RegisterGroup.

Each gdb.RegisterGroup object just wraps a single reggroup pointer,
and (currently) has just one read-only property 'name' that is a
string, the name of the register group.

As with the previous commit (adding gdb.RegisterDescriptor) I made
gdb.RegisterGroup an object rather than just a string in case we want
to add additional properties in the future.

gdb/ChangeLog:

	* NEWS: Mention additions to Python API.
	* python/py-arch.c (archpy_register_groups): New function.
	(arch_object_methods): Add 'register_groups' method.
	* python/py-registers.c (reggroup_iterator_object): New struct.
	(reggroup_object): New struct.
	(gdbpy_new_reggroup): New function.
	(gdbpy_reggroup_to_string): New function.
	(gdbpy_reggroup_name): New function.
	(gdbpy_reggroup_iter): New function.
	(gdbpy_reggroup_iter_next): New function.
	(gdbpy_new_reggroup_iterator): New function
	(gdbpy_initialize_registers): Register new types.
	(reggroup_iterator_object_type): Define new Python type.
	(gdbpy_reggroup_getset): New static global.
	(reggroup_object_type): Define new Python type.
	* python/python-internal.h

gdb/testsuite/ChangeLog:

	* gdb.python/py-arch-reg-groups.exp: New file.

gdb/doc/ChangeLog:

	* gdb.texi (Registers): Add @anchor for 'info registers
	<reggroup>' command.
	* python.texi (Architectures In Python): Document new
	register_groups method.
	(Registers In Python): Document two new object types related to
	register groups.
2020-07-06 15:06:06 +01:00
..
lib/gdb
py-all-events.def
py-arch.c gdb/python: New method to access list of register groups 2020-07-06 15:06:06 +01:00
py-auto-load.c default-args: allow to define default arguments for aliases 2020-06-22 21:14:13 +02:00
py-block.c
py-bpevent.c
py-breakpoint.c
py-cmd.c default-args: allow to define default arguments for aliases 2020-06-22 21:14:13 +02:00
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
py-function.c
py-gdb-readline.c
py-inferior.c
py-infevents.c
py-infthread.c
py-instruction.c
py-instruction.h
py-lazy-string.c
py-linetable.c
py-newobjfileevent.c
py-objfile.c
py-param.c default-args: allow to define default arguments for aliases 2020-06-22 21:14:13 +02:00
py-prettyprint.c
py-progspace.c
py-record-btrace.c
py-record-btrace.h
py-record-full.c
py-record-full.h
py-record.c
py-record.h
py-ref.h
py-registers.c gdb/python: New method to access list of register groups 2020-07-06 15:06:06 +01:00
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c
py-symtab.c
py-threadevent.c
py-tui.c Fix crash when TUI window creation fails 2020-06-16 17:48:38 -06:00
py-type.c gdb: remove TYPE_FIELD_TYPE macro 2020-06-08 15:26:31 -04:00
py-unwind.c gdb/python: Add architecture method to gdb.PendingFrame 2020-07-06 15:06:05 +01:00
py-utils.c
py-value.c
py-varobj.c
py-xmethods.c
python-config.py
python-internal.h gdb/python: New method to access list of register groups 2020-07-06 15:06:06 +01:00
python.c gdb/python: Add gdb.Architecture.registers method 2020-07-06 15:06:06 +01:00
python.h