Fixed write_memory_progbuf() on RV64. (#426)

Abstract write size (aarsize) to shall always match the real
size of the register. This is because abstract write of smaller size
than the register need not be supported per spec (pg. 13 of RISC-V
External Debug Support ver. 0.13.2).
busy
Jan Matyas 2019-11-28 00:24:25 +01:00 committed by Tim Newsome
parent de00906ebd
commit e03dd199e0
1 changed files with 1 additions and 1 deletions

View File

@ -3232,7 +3232,7 @@ static int write_memory_progbuf(struct target *target, target_addr_t address,
/* Write and execute command that moves value into S1 and /* Write and execute command that moves value into S1 and
* executes program buffer. */ * executes program buffer. */
uint32_t command = access_register_command(target, uint32_t command = access_register_command(target,
GDB_REGNO_S1, size > 4 ? 64 : 32, GDB_REGNO_S1, riscv_xlen(target),
AC_ACCESS_REGISTER_POSTEXEC | AC_ACCESS_REGISTER_POSTEXEC |
AC_ACCESS_REGISTER_TRANSFER | AC_ACCESS_REGISTER_TRANSFER |
AC_ACCESS_REGISTER_WRITE); AC_ACCESS_REGISTER_WRITE);