public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Accept unnamed array in gdb.ada/limited-length.exp
@ 2024-07-02 17:15 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-07-02 17:15 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4401c3c098d0c16cd4c7234099e2e3e4a593e173

commit 4401c3c098d0c16cd4c7234099e2e3e4a593e173
Author: Tom Tromey <tromey@adacore.com>
Date:   Tue Jul 2 08:32:36 2024 -0600

    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:
---
 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 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" {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-02 17:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-02 17:15 [binutils-gdb] Accept unnamed array in gdb.ada/limited-length.exp Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).