From patchwork Fri Mar 27 16:22:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Covington X-Patchwork-Id: 46447 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EE69421597 for ; Fri, 27 Mar 2015 21:35:01 +0000 (UTC) Received: by lbcgc5 with SMTP id gc5sf5992621lbc.1 for ; Fri, 27 Mar 2015 14:35:01 -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:cc: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=JzYmyJIwqyd6I2dMhJxGinzoYheNdMncnGhkwm3hI3s=; b=ATCbBgYRwYPJKt779sP/6Faak1NGoJnRpwP88hHp8BTL+3/do2dBvTKRccSU9/Llzu EMdBJnTg+8oKMD6PpLoSuO8zHgpS3XM5Mobr18pdSku259MQBN06ofCABpZhWUMmMsnj bdHF/fi290H0kmr3HVoLCboGskBzFqrUPzDk411BwdZnFzbJHWl/5FsWf4tTNQ89mzb+ pqOJKGsXHAskIks2xJd4E/Nn6t2Jm2E4D+FfN1QoTY4H/wiefcmv/CYBNBMCVpZWipRr 9uMksDxWhXHCWkbZn3jMbBfY0BAscmXVoXoyk4q8neNRuqTvlxideHPIMipX23kXQiDc AOOQ== X-Gm-Message-State: ALoCoQmrmXnK4dm7BUfIyhk4aR3XCg/gEWOCARg11GleSz3Y4qs5cbveR7z6TyB/9GvZ7s/KbBDo X-Received: by 10.194.95.67 with SMTP id di3mr5147576wjb.0.1427492101002; Fri, 27 Mar 2015 14:35:01 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.38 with SMTP id p6ls366725lap.17.gmail; Fri, 27 Mar 2015 14:35:00 -0700 (PDT) X-Received: by 10.152.197.34 with SMTP id ir2mr19314397lac.36.1427492100700; Fri, 27 Mar 2015 14:35:00 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id e8si2142441lam.148.2015.03.27.14.35.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2015 14:35:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbug6 with SMTP id ug6so72692314lbb.3 for ; Fri, 27 Mar 2015 14:35:00 -0700 (PDT) X-Received: by 10.112.162.232 with SMTP id yd8mr18988208lbb.41.1427492100249; Fri, 27 Mar 2015 14:35:00 -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.57.201 with SMTP id k9csp123583lbq; Fri, 27 Mar 2015 14:34:58 -0700 (PDT) X-Received: by 10.229.4.4 with SMTP id 4mr27669706qcp.8.1427492098315; Fri, 27 Mar 2015 14:34:58 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t4si3128633qcp.37.2015.03.27.14.34.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Mar 2015 14:34:58 -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]:52023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ybbu5-0002AI-GU for patch@linaro.org; Fri, 27 Mar 2015 17:34:57 -0400 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) X-Received: by 10.70.50.137 with SMTP id c9mr37348562pdo.66.1427473380316; Fri, 27 Mar 2015 09:23:00 -0700 (PDT) Received: from covaro.wlan.qualcomm.com (rrcs-67-52-130-29.west.biz.rr.com. [67.52.130.29]) by mx.google.com with ESMTPSA id v7sm2615045pds.72.2015.03.27.09.22.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Mar 2015 09:22:59 -0700 (PDT) From: Christopher Covington To: qemu-devel@nongnu.org, Peter Maydell Date: Fri, 27 Mar 2015 12:22:33 -0400 Message-Id: <1427473355-17129-2-git-send-email-christopher.covington@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427473355-17129-1-git-send-email-christopher.covington@linaro.org> References: <1427473355-17129-1-git-send-email-christopher.covington@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.50 X-Mailman-Approved-At: Fri, 27 Mar 2015 17:34:18 -0400 Cc: Liviu Ionescu , Christopher Covington Subject: [Qemu-devel] [PATCH 1/3] arm: semihosting: Improve 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: christopher.covington@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.180 as permitted sender) smtp.mail=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 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; } }