[gdb/testsuite] Mark ptype_union.exp as unsupported for cc-with-gdb-index
authorTom de Vries <tdevries@suse.de>
Fri, 21 Jun 2019 15:03:27 +0000 (17:03 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 21 Jun 2019 15:03:27 +0000 (17:03 +0200)
When testing gdb with board cc-with-gdb-index, we run into:
...
FAIL: gdb.ada/ptype_union.exp: ptype global
FAIL: gdb.ada/ptype_union.exp: print global
...

The index is not supported for Ada (PR24713), and cc-with-gdb-index does not
add an index for Ada test-cases.  However, this test-case compiles C sources,
for which cc-with-gdb-index does add an index.  In gdb we load the executable
containing the index and set the language to Ada, resulting in gdb trying to
handle something that is not supported.

Fix the fail by marking this unsupported.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2019-06-21  Tom de Vries  <tdevries@suse.de>

PR testsuite/24518
PR ada/24713
* gdb.ada/ptype_union.exp: Mark as unsupported if executable contains
index.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/ptype_union.exp

index 60a19eb..d4e7d8b 100644 (file)
@@ -1,3 +1,10 @@
+2019-06-21  Tom de Vries  <tdevries@suse.de>
+
+       PR testsuite/24518
+       PR ada/24713
+       * gdb.ada/ptype_union.exp: Mark as unsupported if executable contains
+       index.
+
 2019-06-19  Tom Tromey  <tromey@adacore.com>
 
        * gdb.ada/length_cond.exp: Add intro comment.
index 4f33721..c27db1f 100644 (file)
@@ -19,6 +19,11 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
     return -1
 }
 
+if {[exec_has_index_section $binfile]} {
+    unsupported "Ada is not currently supported by the index (PR 24713)"
+    return -1
+}
+
 # The test case is written in C, because it was easy to make the
 # required type there; but the bug itself only happens in Ada.
 gdb_test "set lang ada" ""