diff options
Diffstat (limited to 'debug/testlib.py')
-rw-r--r-- | debug/testlib.py | 15 |
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 = [] |