From 55bcf46a7164848099449bc305d269fce1100295 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Wed, 15 Nov 2023 16:16:52 +0000 Subject: [PATCH] riscv32: Added a missing `#if ENABLE_DEBUG` guard around the `DEBUG_PROTO()` lines in `riscv32_mem_write()` --- src/target/riscv32.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/target/riscv32.c b/src/target/riscv32.c index b9d01797f7c..45e98b598aa 100644 --- a/src/target/riscv32.c +++ b/src/target/riscv32.c @@ -576,6 +576,7 @@ void riscv32_mem_read(target_s *const target, void *const dest, const target_add void riscv32_mem_write(target_s *const target, const target_addr_t dest, const void *const src, const size_t len) { +#if ENABLE_DEBUG DEBUG_PROTO("%s: @ %" PRIx32 " len %zu:", __func__, dest, len); const uint8_t *const data = (const uint8_t *)src; for (size_t offset = 0; offset < len; ++offset) { @@ -586,6 +587,7 @@ void riscv32_mem_write(target_s *const target, const target_addr_t dest, const v if (len > 16U) DEBUG_PROTO(" ..."); DEBUG_PROTO("\n"); +#endif /* If we're asked to do a 0-byte read, do nothing */ if (!len) return;