qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 0680521] Fix disassembler memory accesses


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 0680521] Fix disassembler memory accesses
Date: Thu, 07 May 2009 17:15:28 -0000

From: Blue Swirl <address@hidden>

Sparc disassembler wants to check previous addresses for some stuff
and this may actually cause faults to be generated to the guest if the
address is close to page start, because of the function used for the
memory access.

Fix by changing ldub_code to cpu_memory_rw_debug, which doesn't trigger
exceptions.

Signed-off-by: Blue Swirl <address@hidden>

diff --git a/disas.c b/disas.c
index 37f7433..6ed31e3 100644
--- a/disas.c
+++ b/disas.c
@@ -33,10 +33,7 @@ target_read_memory (bfd_vma memaddr,
                     int length,
                     struct disassemble_info *info)
 {
-    int i;
-    for(i = 0; i < length; i++) {
-        myaddr[i] = ldub_code(memaddr + i);
-    }
+    cpu_memory_rw_debug(cpu_single_env, memaddr, myaddr, length, 0);
     return 0;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]