This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] testsuite: XFAIL for false FAIL in watchpoint.exp: no-hw: *


Hi,

with RHEL-{5,6} 7.4->7.5 there are new FAILing tests:

+FAIL: gdb.base/watchpoint.exp: no-hw: self-delete local watch
+PASS: gdb.base/watchpoint.exp: no-hw: cont
+FAIL: gdb.base/watchpoint.exp: no-hw: set partially local watch
+FAIL: gdb.base/watchpoint.exp: no-hw: trigger1 partially local watch
+FAIL: gdb.base/watchpoint.exp: no-hw: trigger2 partially local watch
+FAIL: gdb.base/watchpoint.exp: no-hw: self-delete partially local watch

Continuing.^M
Error evaluating expression for watchpoint 6^M
can't compute CFA for this frame^M
Watchpoint 6 deleted.^M
0x0804847a in func2 () at ./gdb.base/watchpoint.c:99^M
99      }^M
(gdb) FAIL: gdb.base/watchpoint.exp: no-hw: self-delete local watch

The problem is known, I do not have intention to better workaround these old
compilers, so at least XFAIl, do not FAIL.


Thanks,
Jan


gdb/testsuite/
2012-07-18  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Do not false FAIL with old GCCs.
	* gdb.base/watchpoint.exp (self-delete local watch) <$no_hw>: XFAIL for
	GCC < 4.5 in $no_hw mode.

diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index 2941fbf..dc162e9 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -464,7 +464,27 @@ proc test_complex_watchpoint {} {
         #
         gdb_test "watch local_a" ".*\[Ww\]atchpoint \[0-9\]*: local_a" "set local watch"
         gdb_test "cont" "\[Ww\]atchpoint.*local_a.*" "trigger local watch"
-        gdb_test "cont" "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*" "self-delete local watch"
+
+	set test "self-delete local watch"
+        gdb_test_multiple "cont" $test {
+	    -re "Continuing.*\[Ww\]atchpoint .* deleted because the program has left the block in.*which its expression is valid.*\r\n$gdb_prompt $" {
+		pass $test
+	    }
+	    -re "can't compute CFA for this frame.*\r\n$gdb_prompt $" {
+		global compiler_info no_hw
+
+		# GCC < 4.5.0 does not get LOCATIONS_VALID set by dwarf2read.c.
+		# Therefore epilogue unwinder gets applied which is
+		# incompatible with dwarf2_frame_cfa.
+		verbose -log "compiler_info: $compiler_info"
+		if {$no_hw && ([test_compiler_info {gcc-[0-3]-*}]
+			       || [test_compiler_info {gcc-4-[0-4]-*}])} {
+		    xfail "$test (old GCC has broken watchpoints in epilogues)"
+		    return
+		}
+		fail $test
+	    }
+	}
 
         gdb_test "cont" "Continuing.*func2.*"
         # We should be in "func2" again now.  Test a watch of an


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]