From bdde9460b923ab61fad678bf1e3f0da04e1d94ee Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 4 Dec 2009 16:51:48 -0800 Subject: ARM: remove semihosting globals Store a flag and errno in in "struct arm". Have "poll" output report when semihosting is active. Shrink some of the affected lines. Signed-off-by: David Brownell --- src/target/armv4_5.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/target/armv4_5.c') diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index 80c06ef3..412b8290 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -587,16 +587,20 @@ int armv4_5_arch_state(struct target *target) if (armv4_5->common_magic != ARMV4_5_COMMON_MAGIC) { - LOG_ERROR("BUG: called for a non-ARMv4/5 target"); + LOG_ERROR("BUG: called for a non-ARM target"); return ERROR_FAIL; } - LOG_USER("target halted in %s state due to %s, current mode: %s\ncpsr: 0x%8.8" PRIx32 " pc: 0x%8.8" PRIx32 "", + LOG_USER("target halted in %s state due to %s, current mode: %s\n" + "cpsr: 0x%8.8" PRIx32 " pc: 0x%8.8" PRIx32 "%s", armv4_5_state_strings[armv4_5->core_state], - Jim_Nvp_value2name_simple(nvp_target_debug_reason, target->debug_reason)->name, + 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)); + buf_get_u32(armv4_5->core_cache->reg_list[15].value, + 0, 32), + armv4_5->is_semihosting ? ", semihosting" : ""); return ERROR_OK; } -- cgit v1.2.3