summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2010-02-28 23:47:45 +0000
committerPaul Brook <paul@codesourcery.com>2010-02-28 23:47:45 +0000
commit94df27fd2f008ce9f259b72945e02dcad6e98d82 (patch)
tree7f95329d0fea7976bbae08e9c7a4547fe0159453
parent30d11a2a01747ff7d811120528e44046f0fd16b2 (diff)
downloadfocaccia-qemu-94df27fd2f008ce9f259b72945e02dcad6e98d82.tar.gz
focaccia-qemu-94df27fd2f008ce9f259b72945e02dcad6e98d82.zip
Fix userspace breakpoint invalidation
Remove bogus virtual->physical address translation in
breakpoint_invalidate for userspace emulation.

Signed-off-by: Paul Brook <paul@codesourcery.com>
-rw-r--r--exec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 8389c54e7f..52f33f0648 100644
--- a/exec.c
+++ b/exec.c
@@ -1313,6 +1313,12 @@ static void tb_reset_jump_recursive(TranslationBlock *tb)
 }
 
 #if defined(TARGET_HAS_ICE)
+#if defined(CONFIG_USER_ONLY)
+static void breakpoint_invalidate(CPUState *env, target_ulong pc)
+{
+    tb_invalidate_phys_page_range(pc, pc + 1, 0);
+}
+#else
 static void breakpoint_invalidate(CPUState *env, target_ulong pc)
 {
     target_phys_addr_t addr;
@@ -1331,6 +1337,7 @@ static void breakpoint_invalidate(CPUState *env, target_ulong pc)
     tb_invalidate_phys_page_range(ram_addr, ram_addr + 1, 0);
 }
 #endif
+#endif /* TARGET_HAS_ICE */
 
 /* Add a watchpoint.  */
 int cpu_watchpoint_insert(CPUState *env, target_ulong addr, target_ulong len,