From: David Brownell Date: Fri, 4 Dec 2009 00:18:24 +0000 (-0800) Subject: ARMv7-A: tweak arch_state() X-Git-Tag: v0.4.0-rc1~139 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7e2dffbbff2534ca5afa52aa3d811b3599d2ca77;p=openocd ARMv7-A: tweak arch_state() Punt to the armv4_5_arch_state() for all the common stuff, to shrink code and so we will get any improvements it provides. Don't hide watchpoint status if we happen to be in "abort" mode. Signed-off-by: David Brownell --- diff --git a/src/target/armv7a.c b/src/target/armv7a.c index 5d3976f5..e889a8a1 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -98,22 +98,16 @@ int armv7a_arch_state(struct target *target) return ERROR_INVALID_ARGUMENTS; } - LOG_USER("target halted in %s state due to %s, current mode: %s\n" - "cpsr: 0x%8.8" PRIx32 " pc: 0x%8.8" PRIx32 "\n" - "MMU: %s, D-Cache: %s, I-Cache: %s", - armv4_5_state_strings[armv4_5->core_state], - Jim_Nvp_value2name_simple(nvp_target_debug_reason, - target->debug_reason)->name, - arm_mode_name(armv4_5->core_mode), - buf_get_u32(armv4_5->cpsr->value, 0, 32), - buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32), + armv4_5_arch_state(target); + + LOG_USER("MMU: %s, D-Cache: %s, I-Cache: %s", state[armv7a->armv4_5_mmu.mmu_enabled], state[armv7a->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled], state[armv7a->armv4_5_mmu.armv4_5_cache.i_cache_enabled]); if (armv4_5->core_mode == ARMV4_5_MODE_ABT) armv7a_show_fault_registers(target); - else if (target->debug_reason == DBG_REASON_WATCHPOINT) + if (target->debug_reason == DBG_REASON_WATCHPOINT) LOG_USER("Watchpoint triggered at PC %#08x", (unsigned) armv7a->dpm.wp_pc);