Fix off-by-one error.
This commit is contained in:
parent
eef9442aa7
commit
5f53655e65
|
@ -1430,9 +1430,9 @@ static int read_memory(struct target *target, target_addr_t address,
|
|||
|
||||
switch (riscv_xlen(target)) {
|
||||
case 64:
|
||||
riscv013_write_debug_buffer(target, d_addr + 1, (cur_addr - size) >> 32);
|
||||
riscv013_write_debug_buffer(target, d_addr + 1, cur_addr >> 32);
|
||||
case 32:
|
||||
riscv013_write_debug_buffer(target, d_addr, (cur_addr - size));
|
||||
riscv013_write_debug_buffer(target, d_addr, cur_addr);
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("unknown XLEN %d", riscv_xlen(target));
|
||||
|
|
Loading…
Reference in New Issue