aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParshintsev Anatoly <anatoly.parshintsev@syntacore.com>2024-05-28 22:45:37 +0300
committerParshintsev Anatoly <anatoly.parshintsev@syntacore.com>2024-05-28 22:45:37 +0300
commitb201a5db23c0db34c0e10fd1c7c08fc73a5ec3fc (patch)
treead485dd7da472e77b17f4abee2201d453592ae09
parent38ef9cc99b6e1e7ed0a2d713a9c3991ce92013bb (diff)
downloadriscv-openocd-b201a5db23c0db34c0e10fd1c7c08fc73a5ec3fc.zip
riscv-openocd-b201a5db23c0db34c0e10fd1c7c08fc73a5ec3fc.tar.gz
riscv-openocd-b201a5db23c0db34c0e10fd1c7c08fc73a5ec3fc.tar.bz2
target/riscv: do not emit warnings when a non-existent CSR is hidden
hide_csrs should not emit warnings on an attempt to hide non-exitents CSR. hide_csrs funcitonality is intended to be used for scenarios when we don`t want certain groups of registers to be available in GDB. Typically this is needed to simplify integration with various IDE. In such scenarious it may be impractical/unfeseable to figure out which register is present on a target. So reporting a situation when a user wants to hide a non-existent register creates way too much noise. This commit reduces severity of relevant debug message to LOG_TARGET_DEBUG
-rw-r--r--src/target/riscv/riscv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index 26fd365..e7a2fe3 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -6885,7 +6885,7 @@ static void hide_csrs(const struct target *target)
struct reg * const reg = get_reg_cache_entry(target, regno);
const unsigned int csr_number = regno - GDB_REGNO_CSR0;
if (!reg->exist) {
- LOG_TARGET_WARNING(target,
+ LOG_TARGET_DEBUG(target,
"Not hiding CSR %d: register does not exist.",
csr_number);
continue;