aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-04-29 13:22:21 +0200
committerTom de Vries <tdevries@suse.de>2020-04-29 13:22:21 +0200
commit6e4e3fe1b6d68bde1f4e022bd0675fe36420e976 (patch)
tree50dbb75f4e6ae1ab536ef9c34f0d3f8ef38b8621
parentd642b6920b1a697da2e8fa2326cb773612a87f3f (diff)
downloadgdb-6e4e3fe1b6d68bde1f4e022bd0675fe36420e976.zip
gdb-6e4e3fe1b6d68bde1f4e022bd0675fe36420e976.tar.gz
gdb-6e4e3fe1b6d68bde1f4e022bd0675fe36420e976.tar.bz2
[gdb/testsuite] Add xfails for PR gcc/90232
With target board debug-types, we have these FAILs: ... FAIL: gdb.guile/scm-symtab.exp: test simple_struct in static symbols FAIL: gdb.python/py-symtab.exp: test simple_struct in static symbols ... due to PR gcc/90232, as explained in commit 15cd93d05e8 "[gdb/symtab] Handle struct decl with DW_AT_signature". Marks these as XFAILs. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-04-29 Tom de Vries <tdevries@suse.de> * lib/gdb.exp (debug_types): New proc. * gdb.guile/scm-symtab.exp: Add xfail for PR gcc/90232. * gdb.python/py-symtab.exp: Same.
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.guile/scm-symtab.exp19
-rw-r--r--gdb/testsuite/gdb.python/py-symtab.exp17
-rw-r--r--gdb/testsuite/lib/gdb.exp18
4 files changed, 57 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 86b7191..299bb79 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-29 Tom de Vries <tdevries@suse.de>
+
+ * lib/gdb.exp (debug_types): New proc.
+ * gdb.guile/scm-symtab.exp: Add xfail for PR gcc/90232.
+ * gdb.python/py-symtab.exp: Same.
+
2020-04-29 Hannes Domani <ssbssa@yahoo.de>
PR gdb/17320
diff --git a/gdb/testsuite/gdb.guile/scm-symtab.exp b/gdb/testsuite/gdb.guile/scm-symtab.exp
index 4b8c155..b6d5a71 100644
--- a/gdb/testsuite/gdb.guile/scm-symtab.exp
+++ b/gdb/testsuite/gdb.guile/scm-symtab.exp
@@ -32,6 +32,8 @@ if ![gdb_guile_runto_main] {
return
}
+set debug_types [debug_types]
+
# Setup and get the symbol table.
set line_no [gdb_get_line_number "Block break here."]
gdb_breakpoint $line_no
@@ -101,8 +103,21 @@ gdb_test "guile (print (->bool (member \"int\" static-symbols)))" \
"#t" "test int in static symbols"
gdb_test "guile (print (->bool (member \"char\" static-symbols)))" \
"#t" "test char in static symbols"
-gdb_test "guile (print (->bool (member \"simple_struct\" static-symbols)))" \
- "#t" "test simple_struct in static symbols"
+gdb_test_multiple \
+ "guile (print (->bool (member \"simple_struct\" static-symbols)))" \
+ "test simple_struct in static symbols" {
+ -re -wrap "#t" {
+ pass $gdb_test_name
+ }
+ -re -wrap "#f" {
+ if { $debug_types } {
+ # Xfail for PR gcc/90232.
+ xfail $gdb_test_name
+ } else {
+ fail $gdb_test_name
+ }
+ }
+ }
# Test is_valid when the objfile is unloaded. This must be the last
# test as it unloads the object file in GDB.
diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp
index 836cfd2..a0fe885 100644
--- a/gdb/testsuite/gdb.python/py-symtab.exp
+++ b/gdb/testsuite/gdb.python/py-symtab.exp
@@ -32,6 +32,8 @@ if ![runto_main] then {
return 0
}
+set debug_types [debug_types]
+
global hex decimal
# Setup and get the symbol table.
@@ -75,7 +77,20 @@ gdb_test "python print (\"func\" in global_symbols)" "True" "test func in global
gdb_test "python print (\"main\" in global_symbols)" "True" "test main in global symbols"
gdb_test "python print (\"int\" in static_symbols)" "True" "test int in static symbols"
gdb_test "python print (\"char\" in static_symbols)" "True" "test char in static symbols"
-gdb_test "python print (\"simple_struct\" in static_symbols)" "True" "test simple_struct in static symbols"
+gdb_test_multiple "python print (\"simple_struct\" in static_symbols)" \
+ "test simple_struct in static symbols" {
+ -re -wrap "True" {
+ pass $gdb_test_name
+ }
+ -re -wrap "False" {
+ if { $debug_types } {
+ # Xfail for PR gcc/90232.
+ xfail $gdb_test_name
+ } else {
+ fail $gdb_test_name
+ }
+ }
+ }
# Test is_valid when the objfile is unloaded. This must be the last
# test as it unloads the object file in GDB.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 2208f3a..b72ce0c 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -7106,5 +7106,23 @@ proc ensure_gdb_index { binfile } {
return -1
}
+# Return 1 if executable contains .debug_types section. Otherwise, return 0.
+
+proc debug_types { } {
+ global hex
+
+ set cmd "maint info sections"
+ gdb_test_multiple $cmd "" {
+ -re -wrap "at $hex: .debug_types.*" {
+ return 1
+ }
+ -re -wrap "" {
+ return 0
+ }
+ }
+
+ return 0
+}
+
# Always load compatibility stuff.
load_lib future.exp