projects
/
riscv-tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Deal with gdb reporting pmpcfg0 not existing.
[riscv-tests.git]
/
debug
/
testlib.py
diff --git
a/debug/testlib.py
b/debug/testlib.py
index c6bf59cfddad690eb3b35d2474b88cc94e996725..7727f10d5af2947b8b2ec3de39fd74d5f3185a45 100644
(file)
--- a/
debug/testlib.py
+++ b/
debug/testlib.py
@@
-329,6
+329,12
@@
class CannotAccess(Exception):
Exception.__init__(self)
self.address = address
Exception.__init__(self)
self.address = address
+class CouldNotFetch(Exception):
+ def __init__(self, regname, explanation):
+ Exception.__init__(self)
+ self.regname = regname
+ self.explanation = explanation
+
Thread = collections.namedtuple('Thread', ('id', 'description', 'target_id',
'name', 'frame'))
Thread = collections.namedtuple('Thread', ('id', 'description', 'target_id',
'name', 'frame'))
@@
-514,6
+520,9
@@
class Gdb(object):
m = re.search("Cannot access memory at address (0x[0-9a-f]+)", output)
if m:
raise CannotAccess(int(m.group(1), 0))
m = re.search("Cannot access memory at address (0x[0-9a-f]+)", output)
if m:
raise CannotAccess(int(m.group(1), 0))
+ m = re.search(r"Could not fetch register \"(\w+)\"; (.*)$", output)
+ if m:
+ raise CouldNotFetch(m.group(1), m.group(2))
rhs = output.split('=')[-1]
return self.parse_string(rhs)
rhs = output.split('=')[-1]
return self.parse_string(rhs)