aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2018-08-31 12:53:25 -0700
committerTim Newsome <tim@sifive.com>2018-08-31 12:53:25 -0700
commit705c51ef7c478d537c6c7c391b0e3442810a7114 (patch)
treefd87fa7ff71f8e31485b2d2ce69f83a3b8c0a9da /debug/testlib.py
parent4dddbc79ada7f0a836cf538676c57c8df103ccf6 (diff)
downloadriscv-tests-705c51ef7c478d537c6c7c391b0e3442810a7114.zip
riscv-tests-705c51ef7c478d537c6c7c391b0e3442810a7114.tar.gz
riscv-tests-705c51ef7c478d537c6c7c391b0e3442810a7114.tar.bz2
Fix CustomRegisterTest.
gdb in riscv-tools doesn't automatically create a "custom" group like mainline gdb does.
Diffstat (limited to 'debug/testlib.py')
-rw-r--r--debug/testlib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 6adc43a..59440b3 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -556,12 +556,12 @@ class Gdb(object):
output = self.command("info registers %s" % group)
result = {}
for line in output.splitlines():
+ parts = line.split()
+ name = parts[0]
if "Could not fetch" in line:
- name, value = line.split(None, 1)
+ result[name] = " ".join(parts[1:])
else:
- name, hex_value, _ = line.split(None, 2)
- value = int(hex_value, 0)
- result[name] = value
+ result[name] = int(parts[1], 0)
return result
def stepi(self):