Remove hardware breakpoints so future tests work.
[riscv-tests.git] / debug / gdbserver.py
index deb3d579bda1d787e1ece77720e288f819cd61ea..030b6a17aba70386b8a77fc220a5bcf4e843ef19 100755 (executable)
@@ -241,6 +241,9 @@ class DebugTest(DeleteServer):
 
         output = self.gdb.c()
         self.assertIn("Cannot insert hardware breakpoint", output)
+        # Clean up, otherwise the hardware breakpoints stay set and future
+        # tests may fail.
+        self.gdb.command("D")
 
     def test_registers(self):
         # Get to a point in the code where some registers have actually been