From 5bdee8bc669e5fdeb1c978726025a5c0ce2f188c Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Sat, 26 Aug 2017 17:49:13 -0700 Subject: [PATCH] Fix off-by-3 error on 64-bit targets. This caused everything to fall apart when debugging slow 64-bit targets. --- src/target/riscv/riscv-013.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 093ae5625..6ea56ab83 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1438,7 +1438,7 @@ static int read_memory(struct target *target, target_addr_t address, switch (riscv_xlen(target)) { case 64: - riscv013_write_debug_buffer(target, d_addr + 4, (cur_addr - size) >> 32); + riscv013_write_debug_buffer(target, d_addr + 1, (cur_addr - size) >> 32); case 32: riscv013_write_debug_buffer(target, d_addr, (cur_addr - size)); break;