]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Test attributes with array types
authorTom Tromey <tromey@adacore.com>
Fri, 8 May 2026 16:36:26 +0000 (10:36 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 21 May 2026 17:35:30 +0000 (11:35 -0600)
While looking at code coverage, I noticed that gdb was not testing the
case where certain attributes were applied to an Ada array type.  This
patch adds some new tests, improving the coverage.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34043

gdb/testsuite/gdb.ada/array_bounds.exp
gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp

index f9b4fb48cc3699959cc4ba5d3ad7a3b71d09305c..6b9e79ffd00c6580de288dff1a9dd8ac075c6ced 100644 (file)
@@ -32,12 +32,20 @@ if {![runto "bar.adb:$bp_location"]} {
 
 gdb_test "print itable'first" \
     "= 2"
+gdb_test "print ivector'first" \
+    "= 2"
 
 gdb_test "print itable'last" \
     "= 5"
+gdb_test "print ivector'last" \
+    "= 5"
 
 gdb_test "print table'first" \
     "= zero"
+gdb_test "print vector'first" \
+    "= zero"
 
 gdb_test "print table'last" \
     "= two"
+gdb_test "print vector'last" \
+    "= two"
index f90f1d7acc9d9df925528ee54edc9f57c5d52b44..8e359d7bb5642c5d3676ed32feb20994a17be533 100644 (file)
@@ -39,6 +39,9 @@ gdb_test "ptype cold'length" "type = <$decimal-byte integer>"
 gdb_test "ptype vars'length" "type = <$decimal-byte integer>"
 
 gdb_test "ptype full_table'length" "type = <$decimal-byte integer>"
+gdb_test "print full_table'length" "= 5"
 gdb_test "ptype primary_table'length" "type = <$decimal-byte integer>"
+gdb_test "print primary_table'length" " = 3"
 gdb_test "ptype variable_table'length" "type = <$decimal-byte integer>"
 gdb_test "ptype full_pt'length" "type = <$decimal-byte integer>"
+gdb_test "print full_pt'length" "= 5"