Fix userspace breakpoint invalidation
authorPaul Brook <paul@codesourcery.com>
Sun, 28 Feb 2010 23:47:45 +0000 (23:47 +0000)
committerPaul Brook <paul@codesourcery.com>
Sun, 28 Feb 2010 23:47:45 +0000 (23:47 +0000)
Remove bogus virtual->physical address translation in
breakpoint_invalidate for userspace emulation.

Signed-off-by: Paul Brook <paul@codesourcery.com>
exec.c

diff --git a/exec.c b/exec.c
index 8389c54..52f33f0 100644 (file)
--- 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,