From: Tim Newsome Date: Fri, 10 Jun 2016 23:38:37 +0000 (-0700) Subject: Add test_hwbp_2. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=868b2112753be7c1dd8d071e47614fd0dec6649f;p=riscv-tests.git Add test_hwbp_2. --- diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 87692ab..a527ad0 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -196,7 +196,7 @@ class DebugTest(DeleteServer): #TODO self.assertIn("rot13 ", output) self.exit() - def test_hwbp(self): + def test_hwbp_1(self): self.gdb.hbreak("rot13") # The breakpoint should be hit exactly 2 times. for i in range(2): @@ -206,6 +206,17 @@ class DebugTest(DeleteServer): #TODO self.assertIn("rot13 ", output) self.exit() + def test_hwbp_2(self): + self.gdb.hbreak("main") + self.gdb.hbreak("rot13") + # We should hit 3 breakpoints. + for i in range(3): + output = self.gdb.c() + self.gdb.p("$pc") + self.assertIn("Breakpoint ", output) + #TODO self.assertIn("rot13 ", output) + self.exit() + def test_too_many_hwbp(self): for i in range(30): self.gdb.hbreak("*rot13 + %d" % (i * 4))