From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbX2G-0007ug-BT for qemu-devel@nongnu.org; Fri, 27 Mar 2015 12:23:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbX2D-0005dV-4o for qemu-devel@nongnu.org; Fri, 27 Mar 2015 12:23:04 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:33866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbX2C-0005dN-VT for qemu-devel@nongnu.org; Fri, 27 Mar 2015 12:23:01 -0400 Received: by pacwe9 with SMTP id we9so99942827pac.1 for ; Fri, 27 Mar 2015 09:23:00 -0700 (PDT) From: Christopher Covington Date: Fri, 27 Mar 2015 12:22:33 -0400 Message-Id: <1427473355-17129-2-git-send-email-christopher.covington@linaro.org> In-Reply-To: <1427473355-17129-1-git-send-email-christopher.covington@linaro.org> References: <1427473355-17129-1-git-send-email-christopher.covington@linaro.org> Subject: [Qemu-devel] [PATCH 1/3] arm: semihosting: Improve debug prints List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Peter Maydell Cc: Liviu Ionescu , Christopher Covington Print semihosting debugging information before the do_arm_semihosting() call so that angel_SWIreason_ReportException, which causes the function to not return, gets the same debug prints as other semihosting calls. Also print out the semihosting call number. Signed-off-by: Christopher Covington --- target-arm/helper.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 10886c5..3088a18 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -4397,8 +4397,10 @@ void arm_v7m_cpu_do_interrupt(CPUState *cs) nr = arm_lduw_code(env, env->regs[15], env->bswap_code) & 0xff; if (nr == 0xab) { env->regs[15] += 2; + qemu_log_mask(CPU_LOG_INT, + "...handling as semihosting call 0x%x\n", + env->regs[0]); env->regs[0] = do_arm_semihosting(env); - qemu_log_mask(CPU_LOG_INT, "...handled as semihosting call\n"); return; } } @@ -4718,8 +4720,10 @@ void arm_cpu_do_interrupt(CPUState *cs) if (((mask == 0x123456 && !env->thumb) || (mask == 0xab && env->thumb)) && (env->uncached_cpsr & CPSR_M) != ARM_CPU_MODE_USR) { + qemu_log_mask(CPU_LOG_INT, + "...handling as semihosting call 0x%x\n", + env->regs[0]); env->regs[0] = do_arm_semihosting(env); - qemu_log_mask(CPU_LOG_INT, "...handled as semihosting call\n"); return; } } @@ -4736,8 +4740,10 @@ void arm_cpu_do_interrupt(CPUState *cs) if (mask == 0xab && (env->uncached_cpsr & CPSR_M) != ARM_CPU_MODE_USR) { env->regs[15] += 2; + qemu_log_mask(CPU_LOG_INT, + "...handling as semihosting call 0x%x\n", + env->regs[0]); env->regs[0] = do_arm_semihosting(env); - qemu_log_mask(CPU_LOG_INT, "...handled as semihosting call\n"); return; } } -- 1.9.1