Fix off-by-3 error on 64-bit targets.

This caused everything to fall apart when debugging slow 64-bit targets.
This commit is contained in:
Tim Newsome 2017-08-26 17:49:13 -07:00
parent 92ef328161
commit 5bdee8bc66
1 changed files with 1 additions and 1 deletions

View File

@ -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;