From 9d308db2bc72378b6b16aec7c58ccc08d21a23a5 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Mon, 15 May 2017 16:56:50 -0700 Subject: [PATCH] Print out the actual CSR that's read --- src/target/riscv/riscv-013.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 8aeaab6fb..4d309cbed 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -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);