From patchwork Fri Sep 4 15:05:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 53110 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id E440022E23 for ; Fri, 4 Sep 2015 15:14:21 +0000 (UTC) Received: by lanb10 with SMTP id b10sf8294100lan.3 for ; Fri, 04 Sep 2015 08:14:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=OG2LEnMu8Ywblkp2NWrV/xPEzyltSppcAVU8xTIIrnA=; b=LAZHCeWdjP+byL4Qe1ntzrzYxhfeA7nh0hYE5m8eh4qs4J2+cuQ9jNr1NXrHFT00Ol cJ9eEDNgILVpZLvdQWy/tFmwEsQRkk/8VzklWZ4PrQX4eOJ70LeFyEXOam6XLXGvNrTn 0rP2AElY88JOBcDJ3Yn2yBq4TnZcfuSsbFF1Hy7O64wTOWSapzcwNvEmkLLp+caYhetn ItlBPxq2T5vBnge9XlbEvIJVoRyOS0grQLLn/Oz4Hqmc8N+NQG0EFgaD4vJgIjwW7mlh oGFw9ddNKODu2yh41xaWiMslA/1ncjK8s26avG2vkqRJhoTq9dR++kMHFu4xNW1jd0ZW 9tvg== X-Gm-Message-State: ALoCoQmEtPIxu8XfxH+UPSbmh395ahjeAULEU/+eJNLh2ugstRpXOpA74ryzME1QmVPbPvZY2p6c X-Received: by 10.112.173.230 with SMTP id bn6mr1166069lbc.15.1441379660893; Fri, 04 Sep 2015 08:14:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.39 with SMTP id p7ls336459lap.104.gmail; Fri, 04 Sep 2015 08:14:20 -0700 (PDT) X-Received: by 10.152.121.70 with SMTP id li6mr4156507lab.98.1441379660613; Fri, 04 Sep 2015 08:14:20 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id xv12si1421545lab.128.2015.09.04.08.14.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2015 08:14:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbcao8 with SMTP id ao8so13017445lbc.3 for ; Fri, 04 Sep 2015 08:14:20 -0700 (PDT) X-Received: by 10.152.198.140 with SMTP id jc12mr4145341lac.19.1441379660531; Fri, 04 Sep 2015 08:14:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.164.42 with SMTP id yn10csp2049492lbb; Fri, 4 Sep 2015 08:14:19 -0700 (PDT) X-Received: by 10.140.81.135 with SMTP id f7mr5903120qgd.33.1441379659522; Fri, 04 Sep 2015 08:14:19 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p20si3111965qki.52.2015.09.04.08.14.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 04 Sep 2015 08:14:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:60603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsh0-0006FR-LV for patch@linaro.org; Fri, 04 Sep 2015 11:14:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsZD-00009C-Py for qemu-devel@nongnu.org; Fri, 04 Sep 2015 11:06:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXsZC-0000tR-Lb for qemu-devel@nongnu.org; Fri, 04 Sep 2015 11:06:15 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsZC-0000iE-Em for qemu-devel@nongnu.org; Fri, 04 Sep 2015 11:06:14 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZXsYu-0006Em-AU for qemu-devel@nongnu.org; Fri, 04 Sep 2015 16:05:56 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 4 Sep 2015 16:05:32 +0100 Message-Id: <1441379156-23939-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1441379156-23939-1-git-send-email-peter.maydell@linaro.org> References: <1441379156-23939-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 03/27] target-arm: Improve semihosting debug prints X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: 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 Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Tested-by: Christopher Covington Message-id: 1439483745-28752-3-git-send-email-peter.maydell@linaro.org --- 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 7df1f06..114d56e 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -5228,8 +5228,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; } } @@ -5549,8 +5551,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; } } @@ -5567,8 +5571,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; } }