All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Igor V. Kovalenko" <igor.v.kovalenko@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] pass env to raise_exception if called outside of op_helper code
Date: Sun, 03 Jan 2010 15:09:27 +0300	[thread overview]
Message-ID: <20100103120926.29681.1917.stgit@skyserv> (raw)

From: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>

- this fixes stepping with gdb, where do_unassigned_access
  may be called from gdb handler, outside of generated code

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
---
 target-sparc/op_helper.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index 4e0a0e3..bd01a5e 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -3686,21 +3686,24 @@ void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
 void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
                           int is_asi, int size)
 {
-#ifdef DEBUG_UNASSIGNED
     CPUState *saved_env;
 
     /* XXX: hack to restore env in all cases, even if not called from
        generated code */
     saved_env = env;
     env = cpu_single_env;
+
+#ifdef DEBUG_UNASSIGNED
     printf("Unassigned mem access to " TARGET_FMT_plx " from " TARGET_FMT_lx
            "\n", addr, env->pc);
-    env = saved_env;
 #endif
+
     if (is_exec)
         raise_exception(TT_CODE_ACCESS);
     else
         raise_exception(TT_DATA_ACCESS);
+
+    env = saved_env;
 }
 #endif
 

             reply	other threads:[~2010-01-03 12:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03 12:09 Igor V. Kovalenko [this message]
2010-01-03 12:24 ` [Qemu-devel] [PATCH] pass env to raise_exception if called outside of op_helper code Blue Swirl

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=20100103120926.29681.1917.stgit@skyserv \
    --to=igor.v.kovalenko@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.