aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
diff options
context:
space:
mode:
authorcgsfv <cgsfv@users.noreply.github.com>2018-10-03 15:58:00 +0200
committercgsfv <cgsfv@users.noreply.github.com>2018-10-03 15:58:00 +0200
commit6ac2c6350757a07b4469f37eca61bf44854f41c6 (patch)
tree107a96665449b128e280cc9f0ae0ea8c75b7e4c4 /debug/testlib.py
parentfbd7e037ec947c6e9dddc9b78c1cd6bc0fce9993 (diff)
downloadriscv-tests-6ac2c6350757a07b4469f37eca61bf44854f41c6.zip
riscv-tests-6ac2c6350757a07b4469f37eca61bf44854f41c6.tar.gz
riscv-tests-6ac2c6350757a07b4469f37eca61bf44854f41c6.tar.bz2
Added tests for hw and sw watchpoints
Diffstat (limited to 'debug/testlib.py')
-rw-r--r--debug/testlib.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 59440b3..76f09f9 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -587,6 +587,21 @@ class Gdb(object):
assert "Hardware assisted breakpoint" in output
return output
+ def watch(self, expr):
+ output = self.command("watch %s" % expr, ops=5)
+ assert "not defined" not in output
+ assert "atchpoint" in output
+ return output
+
+ def swatch(self, expr):
+ hstate = self.command("show can-use-hw-watchpoints")
+ self.command("set can-use-hw-watchpoints 0")
+ output = self.command("watch %s" % expr, ops=5)
+ assert "not defined" not in output
+ assert "atchpoint" in output
+ self.command("set can-use-hw-watchpoints 1")
+ return output
+
def threads(self):
output = self.command("info threads", ops=100)
threads = []