aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-11-16 08:55:53 -0700
committerTom Tromey <tromey@adacore.com>2020-11-16 08:55:53 -0700
commit119e99bb7f5059ed31e574f0ceda8fbe9951403b (patch)
treef7f659751b7efc87996f2d31f411ae0354acfb44 /gdb
parent2b3cb4006a2e80743eb78f263bd4d6c4f67833f9 (diff)
downloadgdb-119e99bb7f5059ed31e574f0ceda8fbe9951403b.zip
gdb-119e99bb7f5059ed31e574f0ceda8fbe9951403b.tar.gz
gdb-119e99bb7f5059ed31e574f0ceda8fbe9951403b.tar.bz2
Update gdb.dwarf2/data-loc.exp
Tom de Vries pointed out that the series to handle -fgnat-encodings=minimal regressed data-loc.exp: https://sourceware.org/pipermail/gdb-patches/2020-November/173035.html This was my oversight. Looking at the test, it mimics what GNAT emits. The patch series in question changed the approach that gdb takes to such arrays -- now they are transformed back into "old" style structures. (This is perhaps a step backward in a semantics sense, but on the other hand it more accurately reflects the underlying reality, and lets gdb continue to create objects of this type.) This patch updates the test case, by adjusting the expected output. It also removes the tests done in the C language, because they are now incorrect, and because (IMO) they don't add much value. gdb/testsuite/ChangeLog 2020-11-16 Tom Tromey <tromey@adacore.com> * gdb.dwarf2/data-loc.exp: Update expected output. Remove C tests.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.dwarf2/data-loc.exp49
2 files changed, 11 insertions, 43 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 6ecb04c..487d25b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-11-16 Tom Tromey <tromey@adacore.com>
+
+ * gdb.dwarf2/data-loc.exp: Update expected output. Remove C
+ tests.
+
2020-11-15 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/fixed_cmp.exp: Add -fgnat-encodings=minimal testing.
diff --git a/gdb/testsuite/gdb.dwarf2/data-loc.exp b/gdb/testsuite/gdb.dwarf2/data-loc.exp
index ce4062e..832814d 100644
--- a/gdb/testsuite/gdb.dwarf2/data-loc.exp
+++ b/gdb/testsuite/gdb.dwarf2/data-loc.exp
@@ -138,7 +138,7 @@ gdb_test "print foo.three" \
" = \\(1, 2, 3\\)"
gdb_test "ptype foo.three" \
- "type = array \\(1 .. 3\\) of integer"
+ "type = array \\(<>\\) of integer"
gdb_test "print foo.three(1)" \
" = 1"
@@ -160,11 +160,11 @@ gdb_test "print foo.three'length" \
# foo.three_tdef
-gdb_test "print foo.three_tdef" \
+gdb_test "print foo.three_tdef.all" \
" = \\(1, 2, 3\\)"
gdb_test "ptype foo.three_tdef" \
- "type = array \\(1 .. 3\\) of integer"
+ "type = access array \\(<>\\) of integer"
gdb_test "print foo.three_tdef(1)" \
" = 1"
@@ -188,7 +188,7 @@ gdb_test "print foo.five" \
" = \\(2 => 5, 8, 13, 21, 34\\)"
gdb_test "ptype foo.five" \
- "type = array \\(2 .. 6\\) of integer"
+ "type = array \\(<>\\) of integer"
gdb_test "ptype foo.array_type" \
"type = array \\(<>\\) of integer"
@@ -221,11 +221,11 @@ gdb_test "print foo.five'length" \
# foo.five_tdef
-gdb_test "print foo.five_tdef" \
+gdb_test "print foo.five_tdef.all" \
" = \\(2 => 5, 8, 13, 21, 34\\)"
gdb_test "ptype foo.five_tdef" \
- "type = array \\(2 .. 6\\) of integer"
+ "type = access array \\(<>\\) of integer"
gdb_test "print foo.five_tdef(2)" \
" = 5"
@@ -250,40 +250,3 @@ gdb_test "print foo.five_tdef'last" \
gdb_test "print foo.five_tdef'length" \
" = 5"
-
-gdb_test_no_output "set lang c"
-
-# foo__three
-
-gdb_test "print foo__three" \
- " = \\{1, 2, 3\\}"
-
-gdb_test "ptype foo__three" \
- "type = integer \\\[3\\\]"
-
-# foo__three_tdef
-
-gdb_test "print foo__three_tdef" \
- " = \\{1, 2, 3\\}"
-
-gdb_test "ptype foo__three_tdef" \
- "type = integer \\\[3\\\]"
-
-# foo__five
-
-gdb_test "print foo__five" \
- " = \\{5, 8, 13, 21, 34\\}"
-
-gdb_test "ptype foo__five" \
- "type = integer \\\[5\\\]"
-
-# foo__five_tdef
-
-gdb_test "print foo__five_tdef" \
- " = \\{5, 8, 13, 21, 34\\}"
-
-gdb_test "ptype foo__five_tdef" \
- "type = integer \\\[5\\\]"
-
-gdb_test "ptype foo__array_type" \
- "type = integer \\\[variable length\\\]"