This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit/Ada] Fix unconstrained packed array size
> I expected something like that. In such case there should be XFAIL (or maybe
> a different pseudo-FAIL variant but XFAIL seems OK to me) like we did in:
Can you try the following? Looking at the output, providing the readelf
output is just going to clutter the testcase, IMO, so I left it out.
The ___XA type is missing, it's not malformed, and there isn't much
to add (again, IMO).
Thanks,
--
Joel
commit 182688b2f7709c2ea2e5963d4040aaf47b88c492
Author: Joel Brobecker <brobecker@adacore.com>
Date: Mon Feb 21 12:17:39 2011 +0400
add xfail for "print u_var" test in gdb.ada/packed_array.exp
gdb/testsuite/ChangeLog:
* gdb.ada/packed_array.exp: Add xfail for "print u_var" if
the debugger is unable to find the array bounds.
diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
index d7885bb..fc4dd17 100644
--- a/gdb/testsuite/gdb.ada/packed_array.exp
+++ b/gdb/testsuite/gdb.ada/packed_array.exp
@@ -53,6 +53,16 @@ gdb_test "print &var" \
# Print the value of U_Var, an unconstrainted packed array.
-gdb_test "print u_var" \
- "= \\(true, false, false, true, true, false\\)"
+set test "print u_var"
+gdb_test_multiple "$test" "$test" {
+ -re "= \\(true, false, false, true, true, false\\)\[\r\n\]+$gdb_prompt $" {
+ pass $test
+ }
+ -re "= \\(warning: unable to get bounds of array.*\\)\[\r\n\]+$gdb_prompt $" {
+ # The compiler forgot to emit the packed array's ___XA type,
+ # preventing us from determining the what the array bounds
+ # are. Observed with (FSF GNU Ada 4.5.3 20110124).
+ xfail $test
+ }
+}