Add test_too_many_hwbp.
authorTim Newsome <tim@sifive.com>
Fri, 10 Jun 2016 23:30:49 +0000 (16:30 -0700)
committerTim Newsome <tim@sifive.com>
Tue, 19 Jul 2016 01:51:54 +0000 (18:51 -0700)
debug/gdbserver.py

index e9e75c3dc9778e6b4ddf88cd5ded466829ce6a2a..87692abe0eb4d2a389aef28c04cf4aaf90aeddb9 100755 (executable)
@@ -206,6 +206,13 @@ class DebugTest(DeleteServer):
             #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))
+
+        output = self.gdb.c()
+        self.assertIn("Cannot insert hardware breakpoint", output)
+
     def test_registers(self):
         # Get to a point in the code where some registers have actually been
         # used.