aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-08-28 13:46:36 +0200
committerTom de Vries <tdevries@suse.de>2023-08-28 13:46:36 +0200
commitf5362c933e2280398d7aea3cc0748bec8f66a1ab (patch)
treecef69954414897029949e07d68ec1359bb0e8c06
parent6871e2180fcaf0b0478b932306992a7b37999f2f (diff)
downloadgdb-f5362c933e2280398d7aea3cc0748bec8f66a1ab.zip
gdb-f5362c933e2280398d7aea3cc0748bec8f66a1ab.tar.gz
gdb-f5362c933e2280398d7aea3cc0748bec8f66a1ab.tar.bz2
[gdb/testsuite] Add xfail in gdb.cp/subtypes.exp
When running test-case gdb.cp/subtypes.exp with gcc 4.8.4, we run into: ... FAIL: gdb.cp/subtypes.exp: ptype main::Foo FAIL: gdb.cp/subtypes.exp: ptype main::Bar FAIL: gdb.cp/subtypes.exp: ptype main::Baz FAIL: gdb.cp/subtypes.exp: ptype foobar<int>::Foo FAIL: gdb.cp/subtypes.exp: ptype foobar<int>::Bar FAIL: gdb.cp/subtypes.exp: ptype foobar<int>::Baz FAIL: gdb.cp/subtypes.exp: ptype foobar<char>::Foo FAIL: gdb.cp/subtypes.exp: ptype foobar<char>::Bar FAIL: gdb.cp/subtypes.exp: ptype foobar<char>::Baz ... The problem is gcc PR debug/55541, which generates a superfluous DW_TAG_lexical_block. Add a corresponding xfail. Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/gdb.cp/subtypes.exp28
1 files changed, 26 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.cp/subtypes.exp b/gdb/testsuite/gdb.cp/subtypes.exp
index 48c9784..11acd75 100644
--- a/gdb/testsuite/gdb.cp/subtypes.exp
+++ b/gdb/testsuite/gdb.cp/subtypes.exp
@@ -30,19 +30,43 @@ if {[prepare_for_testing "failed to prepare" $testfile \
return -1
}
+# Xfail for superfluous DW_TAG_lexical_block, gcc PR debug/55541.
+set have_xfail [expr [test_compiler_info gcc-*] && [gcc_major_version] < 5]
+
gdb_test "ptype Outer::Inner::InnerInner" \
"type = struct Outer::Inner::InnerInner.*"
gdb_test "ptype Outer::Inner" "type = struct Outer::Inner.*"
foreach s { Foo Bar Baz } {
- gdb_test "ptype main::$s" "type = struct $s.*"
+ gdb_test_multiple "ptype main::$s" "" {
+ -re -wrap "type = struct $s.*" {
+ pass $gdb_test_name
+ }
+ -re -wrap "No symbol \"$s\" in specified context\\." {
+ if { $have_xfail } {
+ setup_xfail *-*-* gcc/55541
+ }
+ fail $gdb_test_name
+ }
+
+ }
}
gdb_test "ptype Outer::Oenum" "type = enum class Outer::Oenum.*"
foreach t { int char } {
foreach s { Foo Bar Baz } {
- gdb_test "ptype foobar<$t>::$s" "type = struct $s.*"
+ gdb_test_multiple "ptype foobar<$t>::$s" "" {
+ -re -wrap "type = struct $s.*" {
+ pass $gdb_test_name
+ }
+ -re -wrap "No symbol \"$s\" in specified context\\." {
+ if { $have_xfail } {
+ setup_xfail *-*-* gcc/55541
+ }
+ fail $gdb_test_name
+ }
+ }
}
}