aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.base/break-idempotent.exp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index 29002f1..837ac00 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -36,6 +36,12 @@
standard_testfile
+# The skip_hw_watchpoint_tests starts GDB on a small test program to
+# check if HW watchpoints are supported. We do not want to restart
+# GDB after this test script has itself started GDB, so call
+# skip_hw_watchpoint_tests first and cache the result.
+set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
+
# Force a breakpoint re-set in GDB. Currently this is done by
# reloading symbols with the "file" command.
@@ -174,7 +180,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
test_break $always_inserted "hbreak"
}
- if {![skip_hw_watchpoint_tests]} {
+ if {!$skip_hw_watchpoint_tests_p} {
test_break $always_inserted "watch"
}