aboutsummaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2018-10-10 09:40:40 -0700
committerTim Newsome <tim@sifive.com>2018-10-29 12:54:25 -0700
commitba5ead7a023a5b959bf0f51135ed0ab7cae15102 (patch)
treef74032ceb951f30ca595759f59f5d727f7c17f8c /debug
parent5ee2425151112bd7d17afc6321a1fbf9efd21116 (diff)
downloadriscv-tests-ba5ead7a023a5b959bf0f51135ed0ab7cae15102.zip
riscv-tests-ba5ead7a023a5b959bf0f51135ed0ab7cae15102.tar.gz
riscv-tests-ba5ead7a023a5b959bf0f51135ed0ab7cae15102.tar.bz2
Almost all tests pass with HiFive1-flash
Only TriggerDmode still fails.
Diffstat (limited to 'debug')
-rwxr-xr-xdebug/gdbserver.py15
-rw-r--r--debug/programs/trigger.S2
2 files changed, 13 insertions, 4 deletions
diff --git a/debug/gdbserver.py b/debug/gdbserver.py
index 783fdc7..fbd8ce2 100755
--- a/debug/gdbserver.py
+++ b/debug/gdbserver.py
@@ -433,12 +433,14 @@ class DebugExit(DebugTest):
class DebugSymbols(DebugTest):
def test(self):
- self.gdb.b("main")
- self.gdb.b("rot13")
+ bp = self.gdb.b("main")
output = self.gdb.c()
assertIn(", main ", output)
+ self.gdb.command("delete %d" % bp)
+ bp = self.gdb.b("rot13")
output = self.gdb.c()
assertIn(", rot13 ", output)
+ self.gdb.command("delete %d" % bp)
class DebugBreakpoint(DebugTest):
def test(self):
@@ -462,6 +464,7 @@ class Hwbp1(DebugTest):
self.gdb.b("main")
self.gdb.c()
+ self.gdb.command("delete")
self.gdb.hbreak("rot13")
# The breakpoint should be hit exactly 2 times.
for _ in range(2):
@@ -469,6 +472,7 @@ class Hwbp1(DebugTest):
self.gdb.p("$pc")
assertRegexpMatches(output, r"[bB]reakpoint")
assertIn("rot13 ", output)
+ self.gdb.b("_exit")
self.exit()
class Hwbp2(DebugTest):
@@ -476,6 +480,7 @@ class Hwbp2(DebugTest):
if self.hart.instruction_hardware_breakpoint_count < 2:
return 'not_applicable'
+ self.gdb.command("delete")
self.gdb.hbreak("main")
self.gdb.hbreak("rot13")
# We should hit 3 breakpoints.
@@ -484,6 +489,8 @@ class Hwbp2(DebugTest):
self.gdb.p("$pc")
assertRegexpMatches(output, r"[bB]reakpoint")
assertIn("%s " % expected, output)
+ self.gdb.command("delete")
+ self.gdb.b("_exit")
self.exit()
class TooManyHwbp(DebugTest):
@@ -799,11 +806,13 @@ class TriggerTest(GdbSingleHartTest):
compile_args = ("programs/trigger.S", )
def setup(self):
self.gdb.load()
- self.gdb.b("_exit")
self.gdb.b("main")
self.gdb.c()
+ self.gdb.command("delete")
def exit(self):
+ self.gdb.command("delete")
+ self.gdb.b("_exit")
output = self.gdb.c()
assertIn("Breakpoint", output)
assertIn("_exit", output)
diff --git a/debug/programs/trigger.S b/debug/programs/trigger.S
index 13f0449..2ccfd21 100644
--- a/debug/programs/trigger.S
+++ b/debug/programs/trigger.S
@@ -93,7 +93,7 @@ read_triggers:
1: SREG zero, 0(a0)
ret
- .data
+ .section .data
.align 3
data: .word 0x40
.word 0x41