diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-02-17 10:15:27 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-02-17 22:29:09 +0000 |
commit | 733da2ced8f948b299bdd10b7ff40146095f43f9 (patch) | |
tree | e8fe443b13691e50acc05237bf425f1e220d7d80 /gdb/testsuite/gdb.xml | |
parent | 490ea364df8bea907b6990200912b99ce79e6a55 (diff) | |
download | fsf-binutils-gdb-733da2ced8f948b299bdd10b7ff40146095f43f9.zip fsf-binutils-gdb-733da2ced8f948b299bdd10b7ff40146095f43f9.tar.gz fsf-binutils-gdb-733da2ced8f948b299bdd10b7ff40146095f43f9.tar.bz2 |
gdb: fix regression in gdb.xml/maint_print_struct.exp
A regression in gdb.xml/maint_print_struct.exp was introduced with
commit:
commit 81b86eced24f905545b58aa6c27478104c364976
Date: Fri Jan 6 09:30:40 2023 -0700
Do not record a rejected target description
The test relied on an invalid target description being stored within
the tdesc_info of the current inferior, the above commit stopped this
behaviour.
Update the test to check that the invalid architecture is NOT stored,
and then check printing the target description directly from the
file.
Approved-By: Tom Tromey <tromey@adacore.com>
Diffstat (limited to 'gdb/testsuite/gdb.xml')
-rw-r--r-- | gdb/testsuite/gdb.xml/maint_print_struct.exp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.xml/maint_print_struct.exp b/gdb/testsuite/gdb.xml/maint_print_struct.exp index 6f41189..fbb16ae 100644 --- a/gdb/testsuite/gdb.xml/maint_print_struct.exp +++ b/gdb/testsuite/gdb.xml/maint_print_struct.exp @@ -21,12 +21,17 @@ require allow_xml_test gdb_start +set xml_file "$srcdir/$subdir/maint_print_struct.xml" + # Required registers are not present so it is expected a warning. # -gdb_test "set tdesc filename $srcdir/$subdir/maint_print_struct.xml" " +gdb_test "set tdesc filename $xml_file" " warning:.*" "setting a new tdesc having only a structure" -gdb_test "maint print c-tdesc" " +gdb_test "maint print c-tdesc" \ + "There is no target description to print\\." + +gdb_test "maint print c-tdesc $xml_file" " .*tdesc_create_reg \\(feature, \"bad_reg1\", \[0-9\]+, 1, NULL, 128, \"two_fielded\"\\);\r .*tdesc_create_reg \\(feature, \"bad_reg2\", \[0-9\]+, 1, NULL, 64, \"bitfield\"\\);\r .*" "printing tdesc with a structure and a bitfield" |