projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cfe2798
)
debug: Make the 'out of reset' tests actually apply reset
author
mwachs5
<megan@sifive.com>
Thu, 6 Jul 2017 22:04:27 +0000
(15:04 -0700)
committer
mwachs5
<megan@sifive.com>
Thu, 6 Jul 2017 22:04:27 +0000
(15:04 -0700)
debug/gdbserver.py
patch
|
blob
|
history
diff --git
a/debug/gdbserver.py
b/debug/gdbserver.py
index 37fd698d58bd74a2e9f174e813230f75ffa3d56f..5ac0153c469cf566fa3a811491475ca5dd4e9796 100755
(executable)
--- a/
debug/gdbserver.py
+++ b/
debug/gdbserver.py
@@
-205,6
+205,9
@@
class MemTestBlock(GdbTest):
class InstantHaltTest(GdbTest):
def test(self):
class InstantHaltTest(GdbTest):
def test(self):
+ """Assert that reset is really resetting what it should."""
+ self.gdb.command("monitor reset halt")
+ self.gdb.command("flushregs")
assertEqual(self.target.reset_vector, self.gdb.p("$pc"))
# mcycle and minstret have no defined reset value.
mstatus = self.gdb.p("$mstatus")
assertEqual(self.target.reset_vector, self.gdb.p("$pc"))
# mcycle and minstret have no defined reset value.
mstatus = self.gdb.p("$mstatus")
@@
-215,6
+218,8
@@
class InstantChangePc(GdbTest):
def test(self):
"""Change the PC right as we come out of reset."""
# 0x13 is nop
def test(self):
"""Change the PC right as we come out of reset."""
# 0x13 is nop
+ self.gdb.command("monitor reset halt")
+ self.gdb.command("flushregs")
self.gdb.command("p *((int*) 0x%x)=0x13" % self.target.ram)
self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 4))
self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 8))
self.gdb.command("p *((int*) 0x%x)=0x13" % self.target.ram)
self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 4))
self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 8))