This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH,committed] fix watch_thread_num.exp without hardware breakpoints
- From: Nathan Froyd <froydnj at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 13 May 2008 14:17:30 -0700
- Subject: [PATCH,committed] fix watch_thread_num.exp without hardware breakpoints
When this patch:
http://sourceware.org/ml/gdb-patches/2007-12/msg00296.html
was being discussed, Daniel suggested that the test should be modified
to take into gdb,no_hardware_watchpoints:
http://sourceware.org/ml/gdb-patches/2007-12/msg00304.html
but the patch went in without making such modifications.
This patch adds such checks. Tested with a remote powerpc-linux-gnu
target, where it fixes several timeout FAILs. Approved offline by
Daniel and committed.
-Nathan
gdb/testsuite/
2008-05-13 Nathan Froyd <froydnj@codesourcery.com>
* gdb.base/watch_thread_num.exp: Don't run tests that require
watchpoints if the target doesn't support them.
Index: gdb/testsuite/gdb.base/watch_thread_num.exp
===================================================================
--- gdb/testsuite/gdb.base/watch_thread_num.exp (revision 207605)
+++ gdb/testsuite/gdb.base/watch_thread_num.exp (working copy)
@@ -72,9 +72,15 @@ gdb_test "watch shared_var thread $threa
gdb_test "info breakpoint 3" "stop only in thread $thread_num"
for {set i 1} {$i <= 10} {incr i 1} {
-gdb_test "continue" "Hardware watchpoint 3: shared_var.*" \
- "Watchpoint triggered iteration $i"
-gdb_test "thread" ".*Current thread is $thread_num .*" \
- "Check thread that triggered iteration $i"
+ set watchpoint "Watchpoint triggered iteration $i"
+ set check "Check thread that triggered iteration $i"
+
+ if {[target_info exists gdb,no_hardware_watchpoints]} {
+ unsupported $watchpoint
+ unsupported $check
+ } else {
+ gdb_test "continue" "Hardware watchpoint 3: shared_var.*" $watchpoint
+ gdb_test "thread" ".*Current thread is $thread_num .*" $check
+ }
}