From 4401c3c098d0c16cd4c7234099e2e3e4a593e173 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 2 Jul 2024 08:32:36 -0600 Subject: 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. --- gdb/testsuite/gdb.ada/limited-length.exp | 21 +++++++++------------ 1 file 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" { -- cgit v1.1