mirror of https://github.com/xemu-project/xemu.git
memory: check for watchpoints when getting code ram_addr
The code to get the ram_addr from a (tlb entry, vaddr) pair checks that the resulting memory is not MMIO, but neglects to check whether the region is hidden by a watchpoint page. Add the missing check. Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
7859cc6e39
commit
32b089808f
3
exec.c
3
exec.c
|
@ -4609,7 +4609,8 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr)
|
||||||
pd = env1->iotlb[mmu_idx][page_index] & ~TARGET_PAGE_MASK;
|
pd = env1->iotlb[mmu_idx][page_index] & ~TARGET_PAGE_MASK;
|
||||||
mr = iotlb_to_region(pd);
|
mr = iotlb_to_region(pd);
|
||||||
if (mr != &io_mem_ram && mr != &io_mem_rom
|
if (mr != &io_mem_ram && mr != &io_mem_rom
|
||||||
&& mr != &io_mem_notdirty && !mr->rom_device) {
|
&& mr != &io_mem_notdirty && !mr->rom_device
|
||||||
|
&& mr != &io_mem_watch) {
|
||||||
#if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SPARC)
|
#if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SPARC)
|
||||||
cpu_unassigned_access(env1, addr, 0, 1, 0, 4);
|
cpu_unassigned_access(env1, addr, 0, 1, 0, 4);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue