Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit/Ada] Fix unconstrained packed array size
Date: Mon, 21 Feb 2011 09:11:00 -0000	[thread overview]
Message-ID: <20110221082121.GA2600@adacore.com> (raw)
In-Reply-To: <20110218205823.GA1001@host1.dyn.jankratochvil.net>

[-- Attachment #1: Type: text/plain, Size: 405 bytes --]

> 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

[-- Attachment #2: packed-array-xfail.diff --]
[-- Type: text/x-diff, Size: 1262 bytes --]

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
+    }
+}
 

  reply	other threads:[~2011-02-21  8:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17  6:57 Joel Brobecker
2011-02-17 22:10 ` Jan Kratochvil
2011-02-18  6:06   ` Joel Brobecker
2011-02-18 21:02     ` Jan Kratochvil
2011-02-21  9:11       ` Joel Brobecker [this message]
2011-02-21  9:13         ` Jan Kratochvil
2011-02-21 10:22           ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110221082121.GA2600@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox