OSDN Git Service

exec: Make cpu_memory_rw_debug use the CPUs AS
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Fri, 13 Dec 2013 06:31:02 +0000 (16:31 +1000)
committerEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Tue, 11 Feb 2014 12:57:49 +0000 (22:57 +1000)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
exec.c

diff --git a/exec.c b/exec.c
index 1e99115..b69fd29 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -2720,11 +2720,11 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr,
         if (l > len)
             l = len;
         phys_addr += (addr & ~TARGET_PAGE_MASK);
-        if (is_write)
-            cpu_physical_memory_write_rom(&address_space_memory,
-                                          phys_addr, buf, l);
-        else
-            cpu_physical_memory_rw(phys_addr, buf, l, is_write);
+        if (is_write) {
+            cpu_physical_memory_write_rom(cpu->as, phys_addr, buf, l);
+        } else {
+            address_space_rw(cpu->as, phys_addr, buf, l, 0);
+        }
         len -= l;
         buf += l;
         addr += l;