From: ntfreak at B. <nt...@ma...> - 2009-07-21 22:19:03
|
Author: ntfreak Date: 2009-07-21 22:19:02 +0200 (Tue, 21 Jul 2009) New Revision: 2555 Modified: trunk/src/target/armv7m.c Log: David Brownell <da...@pa...>: Dump SP on poll, and show whether it's MSP or PSP. Thread mode can use either stack pointer, so this is part of the state that's not yet displayed. Shrink some lines. Modified: trunk/src/target/armv7m.c =================================================================== --- trunk/src/target/armv7m.c 2009-07-21 20:15:11 UTC (rev 2554) +++ trunk/src/target/armv7m.c 2009-07-21 20:19:02 UTC (rev 2555) @@ -478,14 +478,21 @@ { /* get pointers to arch-specific information */ armv7m_common_t *armv7m = target->arch_info; + uint32_t ctrl, sp; + ctrl = buf_get_u32(armv7m->core_cache->reg_list[ARMV7M_CONTROL].value, 0, 32); + sp = buf_get_u32(armv7m->core_cache->reg_list[ARMV7M_R13].value, 0, 32); + LOG_USER("target halted due to %s, current mode: %s %s\n" - "xPSR: 0x%8.8" PRIx32 " pc: 0x%8.8" PRIx32, - Jim_Nvp_value2name_simple(nvp_target_debug_reason,target->debug_reason)->name, + "xPSR: %#8.8" PRIx32 " pc: %#8.8" PRIx32 " %csp: %#8.8" PRIx32, + Jim_Nvp_value2name_simple(nvp_target_debug_reason, + target->debug_reason)->name, armv7m_mode_strings[armv7m->core_mode], armv7m_exception_string(armv7m->exception_number), buf_get_u32(armv7m->core_cache->reg_list[ARMV7M_xPSR].value, 0, 32), - buf_get_u32(armv7m->core_cache->reg_list[ARMV7M_PC].value, 0, 32)); + buf_get_u32(armv7m->core_cache->reg_list[ARMV7M_PC].value, 0, 32), + (ctrl & 0x02) ? 'p' : 'm', + sp); return ERROR_OK; } |