From: Tom Tromey Date: Tue, 2 Jul 2024 14:32:36 +0000 (-0600) Subject: Accept unnamed array in gdb.ada/limited-length.exp X-Git-Tag: binutils-2_43~226 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4401c3c098d0c16cd4c7234099e2e3e4a593e173;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/gdb/testsuite/gdb.ada/limited-length.exp b/gdb/testsuite/gdb.ada/limited-length.exp index 1350e7af209..d0e912b79cf 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" {