From 510df38407da25aa0fa7427d26b9253455885d9b Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Wed, 5 May 2021 12:27:11 +0200 Subject: target/arm_dpm: rename 'wp_pc' as 'wp_addr' The field 'wp_pc' was originally introduced in commit 55eeea7fceb6 ("ARMv7a/Cortex-A8: report watchpoint trigger insn") in end 2009 to contain the address of the instruction which triggered a watchpoint. Later on with commit 651b861d5d5f ("target/aarch64: Add watchpoint support") it has been reused in to hold directly the memory address that triggered a watchpoint. Rename 'wp_pc' as 'wp_addr' and change its doxygen description. While there, fix the format string to print the field. Change-Id: I2e5ced1497e4a6fb6b38f91e881807512e8d8c47 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/6204 Tested-by: jenkins Reviewed-by: Liming Sun --- src/target/armv7a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/target/armv7a.c') diff --git a/src/target/armv7a.c b/src/target/armv7a.c index abca335..5c9f308 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -571,8 +571,7 @@ int armv7a_arch_state(struct target *target) if (arm->core_mode == ARM_MODE_ABT) armv7a_show_fault_registers(target); if (target->debug_reason == DBG_REASON_WATCHPOINT) - LOG_USER("Watchpoint triggered at PC %#08x", - (unsigned) armv7a->dpm.wp_pc); + LOG_USER("Watchpoint triggered at PC " TARGET_ADDR_FMT, armv7a->dpm.wp_addr); return ERROR_OK; } -- cgit v1.1