Skip to content

Commit 7a70a28

Browse files
aap-scen-sc
authored andcommitted
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 Change-Id: Icbb982c4bcce7586fe35b6b004d0874d6014d5a7
1 parent 826923f commit 7a70a28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/target/riscv/riscv_reg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ void riscv_reg_impl_hide_csrs(const struct target *target)
756756
struct reg * const reg = riscv_reg_impl_cache_entry(target, regno);
757757
const unsigned int csr_number = regno - GDB_REGNO_CSR0;
758758
if (!reg->exist) {
759-
LOG_TARGET_WARNING(target,
759+
LOG_TARGET_DEBUG(target,
760760
"Not hiding CSR %d: register does not exist.",
761761
csr_number);
762762
continue;

0 commit comments

Comments
 (0)