aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-06-07 10:08:01 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-07-06 15:06:06 +0100
commit64cb3757a9df273b990adf4f28333324edc3cae8 (patch)
treebd2f7edb9b8da04b018d532afa24b489f020499d /gdb/frame.c
parent0f767f942b027df6de60c42ed0e4a1dac7d0fd4b (diff)
downloadgdb-64cb3757a9df273b990adf4f28333324edc3cae8.zip
gdb-64cb3757a9df273b990adf4f28333324edc3cae8.tar.gz
gdb-64cb3757a9df273b990adf4f28333324edc3cae8.tar.bz2
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.
Diffstat (limited to 'gdb/frame.c')
0 files changed, 0 insertions, 0 deletions