diff options
author | Tom Tromey <tromey@adacore.com> | 2024-07-02 08:32:36 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-07-02 11:15:31 -0600 |
commit | 4401c3c098d0c16cd4c7234099e2e3e4a593e173 (patch) | |
tree | 50f3d62ec9a716385e7618d97044c60473b73480 /gdb/testsuite | |
parent | d59d4e2f3a86671a4ce7ef89a53b259a820e9af4 (diff) | |
download | gdb-4401c3c098d0c16cd4c7234099e2e3e4a593e173.zip gdb-4401c3c098d0c16cd4c7234099e2e3e4a593e173.tar.gz gdb-4401c3c098d0c16cd4c7234099e2e3e4a593e173.tar.bz2 |
Accept unnamed array in gdb.ada/limited-length.exp
Some compiler changes I'm working on cause a regression in
gdb.ada/limited-length.exp -- with the changes, the array type is
nameless and so is not mentioned in the max-value-size error message.
Because the array type is nameless in the source code, this seems like
an improvement to me, and so this patch changes the test to accept
either form.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.ada/limited-length.exp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/gdb/testsuite/gdb.ada/limited-length.exp b/gdb/testsuite/gdb.ada/limited-length.exp index 1350e7a..d0e912b 100644 --- a/gdb/testsuite/gdb.ada/limited-length.exp +++ b/gdb/testsuite/gdb.ada/limited-length.exp @@ -73,18 +73,15 @@ set elem_size [get_valueof "/d" "(Large_1d_Array(1)'Size + 7) / 8" "*unknown*"] gdb_test_no_output "set max-value-size [expr $elem_size * $elements]" with_test_prefix "with reduced max-value size" { - gdb_test "print Large_1d_Array" \ - "value of type `.*' requires $decimal bytes,\ - which is more than max-value-size" - gdb_test "output Large_1d_Array" \ - "value of type `.*' requires $decimal bytes,\ - which is more than max-value-size" - gdb_test "print Large_3d_Array" \ - "value of type `.*' requires $decimal bytes,\ - which is more than max-value-size" - gdb_test "output Large_3d_Array" \ - "value of type `.*' requires $decimal bytes,\ - which is more than max-value-size" + # GNAT historically named this type, but as the array type is + # nameless, this accepts both variants. + set response \ + "value (of type `.*' )?requires $decimal bytes, which is more than max-value-size" + + gdb_test "print Large_1d_Array" $response + gdb_test "output Large_1d_Array" $response + gdb_test "print Large_3d_Array" $response + gdb_test "output Large_3d_Array" $response } with_test_prefix "with reduced print -elements flag" { |