diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-08 17:14:56 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-08 17:14:56 +0000 |
commit | c2f07f81a2d52d9d5243ead61d93e875487acf70 (patch) | |
tree | 2aada5d63a27227de4e2991627e5fc03fc806914 /exec.c | |
parent | af5db58e8b8a997fb3849046ec1f5df4527ff8b8 (diff) |
Fix breakpoint TLB invalidation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1799 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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 |