diff options
author | Stafford Horne <shorne@gmail.com> | 2017-12-27 23:36:31 +0900 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2017-12-27 23:36:31 +0900 |
commit | cef0f8684e818f8b6c71c44dc9cc28a6d0ac3754 (patch) | |
tree | f39a9a5943b9dc8de588826f0d4914b1abb9abd2 /gdb/testsuite/gdb.xml | |
parent | f7efd549485db1fd84dbd2f2ee36d80c2739f224 (diff) | |
download | fsf-binutils-gdb-cef0f8684e818f8b6c71c44dc9cc28a6d0ac3754.zip fsf-binutils-gdb-cef0f8684e818f8b6c71c44dc9cc28a6d0ac3754.tar.gz fsf-binutils-gdb-cef0f8684e818f8b6c71c44dc9cc28a6d0ac3754.tar.bz2 |
tdesc: handle arbitrary strings in tdesc_register_in_reggroup_p
tdesc_register_in_reggroup_p in now able to handle arbitrary
groups. This is useful when groups are created while the
target descriptor file is received from the remote.
This can be the case of a soft core target processor where
registers/groups can change.
gdb/ChangeLog:
yyyy-mm-dd Franck Jullien <franck.jullien@gmail.com>
Stafford Horne <shorne@gmail.com>
* target-descriptions.c (tdesc_register_in_reggroup_p): Support
arbitrary strings.
(tdesc_use_registers): Add logic to register new reggroups.
(tdesc_reg::group): Update comment to indicate we allow
arbitrary strings.
* NEWS (Changes since GDB 8.0): Announce that GDB supports
arbitrary reggroups.
gdb/testsuite/ChangeLog:
yyyy-mm-dd Stafford Horne <shorne@gmail.com>
* gdb.xml/extra-regs.xml: Add example foo reggroup.
* gdb.xml/tdesc-regs.exp: Add test to check for foo reggroup.
gdb/doc/ChangeLog:
yyyy-mm-dd Stafford Horne <shorne@gmail.com>
* gdb.texinfo (Target Description Format): Explain that arbitrary
strings are now allowed for register groups.
Diffstat (limited to 'gdb/testsuite/gdb.xml')
-rw-r--r-- | gdb/testsuite/gdb.xml/extra-regs.xml | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.xml/tdesc-regs.exp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.xml/extra-regs.xml b/gdb/testsuite/gdb.xml/extra-regs.xml index 997d659..302e64c 100644 --- a/gdb/testsuite/gdb.xml/extra-regs.xml +++ b/gdb/testsuite/gdb.xml/extra-regs.xml @@ -53,5 +53,6 @@ <reg name="bitfields" bitsize="64" type="struct2"/> <reg name="flags" bitsize="32" type="flags"/> <reg name="mixed_flags" bitsize="32" type="mixed_flags"/> + <reg name="groupreg" bitsize="32" type="uint32" group="foo"/> </feature> </target> diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp index d62ed98..e8b7fd5 100644 --- a/gdb/testsuite/gdb.xml/tdesc-regs.exp +++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp @@ -190,6 +190,9 @@ gdb_test "ptype \$flags" \ "type = flag flags {\r\n *bool X @0;\r\n *uint32_t Y @2;\r\n}" gdb_test "ptype \$mixed_flags" \ "type = flag mixed_flags {\r\n *bool A @0;\r\n *uint32_t B @1-3;\r\n *bool C @4;\r\n *uint32_t D @5;\r\n *uint32_t @6-7;\r\n *enum {yes = 1, no = 0, maybe = 2, so} Z @8-9;\r\n}" +# Reggroups should have at least general and the extra foo group +gdb_test "maintenance print reggroups" \ + " Group\[ \t\]+Type\[ \t\]+\r\n.* general\[ \t\]+user\[ \t\]+\r\n.* foo\[ \t\]+user\[ \t\]+" load_description "core-only.xml" "" "test-regs.xml" # The extra register from the previous description should be gone. |