From 868b2112753be7c1dd8d071e47614fd0dec6649f Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Fri, 10 Jun 2016 16:38:37 -0700 Subject: [PATCH] Add test_hwbp_2. --- debug/gdbserver.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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)) -- 2.30.2