Update regnum handling to match gdb CSR changes.
[riscv-isa-sim.git] / tests / testlib.py
index 0c1713c846d39bea31f7a06d4bb4ae42403f3c13..d41c150a72866e56cd8a41e3c2d561ba6eafbfc3 100644 (file)
@@ -56,3 +56,11 @@ class Gdb(object):
         output = self.command("x/%s %s" % (size, address))
         value = int(output.split(':')[1].strip())
         return value
+
+    def p(self, obj):
+        output = self.command("p %s" % obj)
+        value = int(output.split('=')[-1].strip())
+        return value
+
+    def stepi(self):
+        return self.command("stepi")