Print out the actual CSR that's read

release
Palmer Dabbelt 2017-05-15 16:56:50 -07:00
parent 8252b9d36c
commit 9d308db2bc
1 changed files with 1 additions and 0 deletions

View File

@ -577,6 +577,7 @@ static int register_read_direct(struct target *target, uint64_t *value, uint32_t
} else if (number >= GDB_REGNO_FPR0 && number <= GDB_REGNO_FPR31) {
riscv_program_fsd(&program, number, output);
} else if (number >= GDB_REGNO_CSR0 && number <= GDB_REGNO_CSR4095) {
LOG_DEBUG("reading CSR index=0x%03x", number - GDB_REGNO_CSR0);
enum gdb_regno temp = riscv_program_gettemp(&program);
riscv_program_csrr(&program, temp, number);
riscv_program_sx(&program, temp, output);