diff options
author | liangzhen <zhen.liang@spacemit.com> | 2023-10-16 10:53:02 +0800 |
---|---|---|
committer | liangzhen <zhen.liang@spacemit.com> | 2023-10-17 09:17:11 +0800 |
commit | 57544c2c89f720015ca6c25ca1632603ab712901 (patch) | |
tree | d6355e4f8c0dd6545f1b4139c97d8a095ab3a79a /debug/gdbserver.py | |
parent | c36c814ae49610bc407a5c4e144866fa50e4510e (diff) | |
download | riscv-tests-57544c2c89f720015ca6c25ca1632603ab712901.zip riscv-tests-57544c2c89f720015ca6c25ca1632603ab712901.tar.gz riscv-tests-57544c2c89f720015ca6c25ca1632603ab712901.tar.bz2 |
Make the non-existent csr configurable
Signed-off-by: liangzhen <zhen.liang@spacemit.com>
Diffstat (limited to 'debug/gdbserver.py')
-rwxr-xr-x | debug/gdbserver.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 3a6f932..4b2291c 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -221,14 +221,15 @@ class CustomRegisterTest(SimpleRegisterTest): class SimpleNoExistTest(GdbTest): def test(self): + nonexist_csr = self.hart.nonexist_csr try: - self.gdb.p("$csr2288") - assert False, "Reading csr2288 should have failed" + self.gdb.p(f"${nonexist_csr}") + assert False, f"Reading the ${nonexist_csr} should have failed" except testlib.CouldNotFetch: pass try: - self.gdb.p("$csr2288=5") - assert False, "Writing csr2288 should have failed" + self.gdb.p(f"${nonexist_csr}=5") + assert False, f"Writing the ${nonexist_csr} should have failed" except testlib.CouldNotFetch: pass |