[binutils-gdb] Test attributes with array types
Tom Tromey via Gdb-cvs <[email protected]> Thu, 21 May 2026 17:36:05 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=80b5a799d2e6e641b6232c7513e72609e26341f0 commit 80b5a799d2e6e641b6232c7513e72609e26341f0 Author: Tom Tromey <[email protected]> Date: Fri May 8 10:36:26 2026 -0600 Test attributes with array types 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 Diff: --- gdb/testsuite/gdb.ada/array_bounds.exp | 8 ++++++++ gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp | 3 +++ 2 files changed, 11 insertions(+) diff --git a/gdb/testsuite/gdb.ada/array_bounds.exp b/gdb/testsuite/gdb.ada/array_bounds.exp index f9b4fb48cc3..6b9e79ffd00 100644 --- a/gdb/testsuite/gdb.ada/array_bounds.exp +++ b/gdb/testsuite/gdb.ada/array_bounds.exp @@ -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" diff --git a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp index f90f1d7acc9..8e359d7bb56 100644 --- a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp +++ b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp @@ -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"