Am 29.09.2012 20:10, schrieb Richard Henderson:
Signed-off-by: Richard Henderson<r...@twiddle.net>
---
  user-exec.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/user-exec.c b/user-exec.c
index ef9b172..1635e4a 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -352,8 +352,8 @@ int cpu_signal_handler(int host_signum, void *pinfo,
  {
      siginfo_t *info = pinfo;
      struct ucontext *uc = puc;
-    uint32_t *pc = uc->uc_mcontext.sc_pc;
-    uint32_t insn = *pc;
+    unsigned long pc = uc->uc_mcontext.sc_pc;

I'd prefer uintptr_t instead of unsigned long.
Otherwise the following type cast is not portable
(even if that doesn't matter currently because
that code is not compiled with MinGW).

Yes, there is more similar code in user-exec.c.

+    uint32_t insn = *(uint32_t *)pc;
      int is_write = 0;

      /* XXX: need kernel patch to get write flag faster */


Regards

Stefan W.


Reply via email to