From 0d211cd3885c2b98c4a2cfe01daff80b921e63fb Mon Sep 17 00:00:00 2001 From: mwachs5 Date: Thu, 6 Jul 2017 15:04:27 -0700 Subject: [PATCH] debug: Make the 'out of reset' tests actually apply reset --- debug/gdbserver.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 37fd698..5ac0153 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -205,6 +205,9 @@ class MemTestBlock(GdbTest): 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") @@ -215,6 +218,8 @@ class InstantChangePc(GdbTest): 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)) -- 2.30.2