[pushed/ob] gdb.base/watchpoint-running.exp: Run sw watch tests even if no hw watch

Message ID 20240507121111.191735-2-pedro@palves.net
State New
Headers
Series [pushed/ob] gdb.base/watchpoint-running.exp: Run sw watch tests even if no hw watch |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Pedro Alves May 7, 2024, 12:11 p.m. UTC
  The code in gdb.base/watchpoint-running.exp that is trying to skip
testing with hardware watchpoints also skips testing with software
watchpoints if hardware watchpoints aren't supported by the target.
This fixes it.

Change-Id: Iaed62ac827b32b4fd73b732ad81fa4a5aa5784ba
---
 gdb/testsuite/gdb.base/watchpoint-running.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gdb/testsuite/gdb.base/watchpoint-running.exp b/gdb/testsuite/gdb.base/watchpoint-running.exp
index c75309e8f45..c3aae30ffba 100644
--- a/gdb/testsuite/gdb.base/watchpoint-running.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-running.exp
@@ -125,7 +125,7 @@  proc test {stop_mode hw} {
 }
 
 foreach hw {0 1} {
-    if {!$allow_hw_watchpoint_tests_p} {
+    if {$hw && !$allow_hw_watchpoint_tests_p} {
 	continue
     }
     foreach stop_mode {all-stop non-stop} {