aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'debug/testlib.py')
-rw-r--r--debug/testlib.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 1d46b6c..6adc43a 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -552,6 +552,18 @@ class Gdb(object):
value = shlex.split(output.split('=')[-1].strip())[1]
return value
+ def info_registers(self, group):
+ output = self.command("info registers %s" % group)
+ result = {}
+ for line in output.splitlines():
+ if "Could not fetch" in line:
+ name, value = line.split(None, 1)
+ else:
+ name, hex_value, _ = line.split(None, 2)
+ value = int(hex_value, 0)
+ result[name] = value
+ return result
+
def stepi(self):
output = self.command("stepi", ops=10)
return output