From e1a062392132cadd9ee414a76f33b66ac8482927 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Wed, 20 Dec 2023 09:51:57 +0000 Subject: [PATCH] cortexar: Implemented proto level diagnostics for the coprocessor read/write routines --- src/target/cortexar.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/target/cortexar.c b/src/target/cortexar.c index 99a7c493e73..78a67986e52 100644 --- a/src/target/cortexar.c +++ b/src/target/cortexar.c @@ -556,11 +556,14 @@ static uint32_t cortexar_coproc_read(target_s *const target, const uint8_t copro cortexar_run_insn(target, ARM_MRC_INSN | ENCODE_CP_ACCESS(coproc & 0xfU, (op >> 8U) & 0x7U, 0U, (op >> 4U) & 0xfU, op & 0xfU, (op >> 12U) & 0x7U)); - return cortexar_core_reg_read(target, 0U); + const uint32_t result = cortexar_core_reg_read(target, 0U); + DEBUG_PROTO("%s: coproc %u (%04x): %08" PRIx32 "\n", __func__, coproc, op, result); + return result; } static void cortexar_coproc_write(target_s *const target, const uint8_t coproc, const uint16_t op, const uint32_t value) { + DEBUG_PROTO("%s: coproc %u (%04x): %08" PRIx32 "\n", __func__, coproc, op, value); /* * Perform a write of a coprocessor - which one (between 0 and 15) is given by the coproc parameter * and which register of the coprocessor to write and the operands required is given by op.