Fix for gdb.python/py-breakpoint.exp
authorCarl Love <cel@us.ibm.com>
Tue, 20 Jul 2021 23:08:15 +0000 (18:08 -0500)
committerCarl Love <cel@us.ibm.com>
Fri, 23 Jul 2021 15:34:42 +0000 (10:34 -0500)
Not all systems have hardware breakpoint support.  Add a check
to see if the system supports hardware breakpoints.

gdb/testsuite/ChangeLog

* gdb.python/py-breakpoint.exp (test_hardware_breakpoints): Add
check for hardware breakpoint support.

gdb/testsuite/gdb.python/py-breakpoint.exp

index d8fb85b784c119145a65cda7ae83068332dfca7f..e2ffe8cbe468692212985f9821a598ad832a8ad5 100644 (file)
@@ -255,6 +255,9 @@ proc_with_prefix test_bkpt_invisible { } {
 proc_with_prefix test_hardware_breakpoints { } {
     global srcfile testfile hex decimal
 
+    # Skip these tests if the HW does not support hardware breakpoints.
+    if { [skip_hw_breakpoint_tests] } { return 0 }
+
     # Start with a fresh gdb.
     clean_restart ${testfile}