aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2018-07-03 13:54:13 -0700
committerTim Newsome <tim@sifive.com>2018-07-03 13:54:13 -0700
commit8519aa3f0ccf4032249b346fbd67855da99b5f3c (patch)
tree1080f311dd46795d75b9254ea92d440e6bf6a916
parent9862522869fb126371482b6802482c5e451d8333 (diff)
downloadriscv-tests-8519aa3f0ccf4032249b346fbd67855da99b5f3c.zip
riscv-tests-8519aa3f0ccf4032249b346fbd67855da99b5f3c.tar.gz
riscv-tests-8519aa3f0ccf4032249b346fbd67855da99b5f3c.tar.bz2
rwatch/watch on explicit address
Newer gdb requires more debug info in order to "watch data" in this test. I'm not sure how to make that debug info happen, so instead we tell it the address to use.
-rwxr-xr-xdebug/gdbserver.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/debug/gdbserver.py b/debug/gdbserver.py
index 257f8d4..bd9babc 100755
--- a/debug/gdbserver.py
+++ b/debug/gdbserver.py
@@ -692,7 +692,8 @@ class TriggerLoadAddressInstant(TriggerTest):
self.gdb.c()
read_loop = self.gdb.p("&read_loop")
read_again = self.gdb.p("&read_again")
- self.gdb.command("rwatch data")
+ data = self.gdb.p("&data")
+ self.gdb.command("rwatch *0x%x" % data)
self.gdb.c()
# Accept hitting the breakpoint before or after the load instruction.
assertIn(self.gdb.p("$pc"), [read_loop, read_loop + 4])
@@ -719,7 +720,8 @@ class TriggerStoreAddressInstant(TriggerTest):
self.gdb.command("b just_before_write_loop")
self.gdb.c()
write_loop = self.gdb.p("&write_loop")
- self.gdb.command("watch data")
+ data = self.gdb.p("&data")
+ self.gdb.command("watch *0x%x" % data)
self.gdb.c()
# Accept hitting the breakpoint before or after the store instruction.
assertIn(self.gdb.p("$pc"), [write_loop, write_loop + 4])