Check all PCs after reset.
authorTim Newsome <tim@sifive.com>
Tue, 18 Jul 2017 18:35:59 +0000 (11:35 -0700)
committerTim Newsome <tim@sifive.com>
Tue, 18 Jul 2017 18:35:59 +0000 (11:35 -0700)
debug/gdbserver.py

index 5ac0153c469cf566fa3a811491475ca5dd4e9796..f6c61c3eae7877d9fa99062ebbf947c238832e54 100755 (executable)
@@ -208,7 +208,13 @@ class InstantHaltTest(GdbTest):
         """Assert that reset is really resetting what it should."""
         self.gdb.command("monitor reset halt")
         self.gdb.command("flushregs")
-        assertEqual(self.target.reset_vector, self.gdb.p("$pc"))
+        threads = self.gdb.threads()
+        pcs = []
+        for t in threads:
+            self.gdb.thread(t)
+            pcs.append(self.gdb.p("$pc"))
+        for pc in pcs:
+            assertEqual(self.target.reset_vector, pc)
         # mcycle and minstret have no defined reset value.
         mstatus = self.gdb.p("$mstatus")
         assertEqual(mstatus & (MSTATUS_MIE | MSTATUS_MPRV |