From c2f07f81a2d52d9d5243ead61d93e875487acf70 Mon Sep 17 00:00:00 2001 From: pbrook Date: Sat, 8 Apr 2006 17:14:56 +0000 Subject: Fix breakpoint TLB invalidation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1799 c046a42c-6fe2-441c-8c8c-71466251a162 --- exec.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c index 9ad2edcf3b..4b53003829 100644 --- a/exec.c +++ b/exec.c @@ -1003,10 +1003,19 @@ static void tb_reset_jump_recursive(TranslationBlock *tb) #if defined(TARGET_HAS_ICE) static void breakpoint_invalidate(CPUState *env, target_ulong pc) { - target_ulong phys_addr; + target_ulong addr, pd; + ram_addr_t ram_addr; + PhysPageDesc *p; - phys_addr = cpu_get_phys_page_debug(env, pc); - tb_invalidate_phys_page_range(phys_addr, phys_addr + 1, 0); + addr = cpu_get_phys_page_debug(env, pc); + p = phys_page_find(addr >> TARGET_PAGE_BITS); + if (!p) { + pd = IO_MEM_UNASSIGNED; + } else { + pd = p->phys_offset; + } + ram_addr = (pd & TARGET_PAGE_MASK) | (pc & ~TARGET_PAGE_MASK); + tb_invalidate_ram_page_range(ram_addr, ram_addr + 1, 0); } #endif -- cgit v1.2.3