qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Covington <christopher.covington@linaro.org>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: Liviu Ionescu <ilg@livius.net>,
	Christopher Covington <christopher.covington@linaro.org>
Subject: [Qemu-devel] [PATCH 1/3] arm: semihosting: Improve debug prints
Date: Fri, 27 Mar 2015 12:22:33 -0400	[thread overview]
Message-ID: <1427473355-17129-2-git-send-email-christopher.covington@linaro.org> (raw)
In-Reply-To: <1427473355-17129-1-git-send-email-christopher.covington@linaro.org>

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 <christopher.covington@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 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

  reply	other threads:[~2015-03-27 16:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 16:22 [Qemu-devel] arm: semihosting: Preliminary AArch64 support Christopher Covington
2015-03-27 16:22 ` Christopher Covington [this message]
2015-03-27 16:25   ` [Qemu-devel] [PATCH 1/3] arm: semihosting: Improve debug prints Peter Maydell
2015-03-27 16:22 ` [Qemu-devel] [PATCH 2/3] arm: semihosting: Create unsupported call function Christopher Covington
2015-03-27 16:41   ` Peter Maydell
2015-03-27 16:22 ` [Qemu-devel] [PATCH 3/3] arm: semihosting: Wire up A64 HLT 0xf000 Christopher Covington
2015-03-27 16:40   ` Peter Maydell
2015-03-28 12:27     ` Christopher Covington
2015-03-31 11:22       ` Peter Maydell
2015-03-27 16:57 ` [Qemu-devel] arm: semihosting: Preliminary AArch64 support Liviu Ionescu
2015-03-27 17:05   ` Peter Maydell
2015-03-27 17:15     ` Leon Alrae
2015-03-27 17:21       ` Peter Maydell
2015-03-27 17:33       ` Liviu Ionescu
2015-03-30 11:44         ` Leon Alrae
2015-03-30 12:27           ` Liviu Ionescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427473355-17129-2-git-send-email-christopher.covington@linaro.org \
    --to=christopher.covington@linaro.org \
    --cc=ilg@livius.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).