mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-08 16:07:39 -06:00
Merge branch 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa
* 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa: target-xtensa: add breakpoint tests target-xtensa: add DEBUG_SECTION to overlay tool target-xtensa: add DBREAK data breakpoints exec: let cpu_watchpoint_insert accept larger watchpoints exec: fix check_watchpoint exiting cpu_loop exec: add missing breaks to the watch_mem_write target-xtensa: add ICOUNT SR and debug exception target-xtensa: implement instruction breakpoints target-xtensa: add DEBUGCAUSE SR and configuration target-xtensa: fetch 3rd opcode byte only when needed target-xtensa: implement info tlb monitor command target-xtensa: define TLB_TEMPLATE for MMU-less cores
This commit is contained in:
commit
b3e54c689c
13 changed files with 674 additions and 15 deletions
18
exec.c
18
exec.c
|
@ -1504,7 +1504,8 @@ int cpu_watchpoint_insert(CPUState *env, target_ulong addr, target_ulong len,
|
|||
CPUWatchpoint *wp;
|
||||
|
||||
/* sanity checks: allow power-of-2 lengths, deny unaligned watchpoints */
|
||||
if ((len != 1 && len != 2 && len != 4 && len != 8) || (addr & ~len_mask)) {
|
||||
if ((len & (len - 1)) || (addr & ~len_mask) ||
|
||||
len == 0 || len > TARGET_PAGE_SIZE) {
|
||||
fprintf(stderr, "qemu: tried to set invalid watchpoint at "
|
||||
TARGET_FMT_lx ", len=" TARGET_FMT_lu "\n", addr, len);
|
||||
return -EINVAL;
|
||||
|
@ -3331,11 +3332,12 @@ static void check_watchpoint(int offset, int len_mask, int flags)
|
|||
tb_phys_invalidate(tb, -1);
|
||||
if (wp->flags & BP_STOP_BEFORE_ACCESS) {
|
||||
env->exception_index = EXCP_DEBUG;
|
||||
cpu_loop_exit(env);
|
||||
} else {
|
||||
cpu_get_tb_cpu_state(env, &pc, &cs_base, &cpu_flags);
|
||||
tb_gen_code(env, pc, cs_base, cpu_flags, 1);
|
||||
cpu_resume_from_signal(env, NULL);
|
||||
}
|
||||
cpu_resume_from_signal(env, NULL);
|
||||
}
|
||||
} else {
|
||||
wp->flags &= ~BP_WATCHPOINT_HIT;
|
||||
|
@ -3363,9 +3365,15 @@ static void watch_mem_write(void *opaque, target_phys_addr_t addr,
|
|||
{
|
||||
check_watchpoint(addr & ~TARGET_PAGE_MASK, ~(size - 1), BP_MEM_WRITE);
|
||||
switch (size) {
|
||||
case 1: stb_phys(addr, val);
|
||||
case 2: stw_phys(addr, val);
|
||||
case 4: stl_phys(addr, val);
|
||||
case 1:
|
||||
stb_phys(addr, val);
|
||||
break;
|
||||
case 2:
|
||||
stw_phys(addr, val);
|
||||
break;
|
||||
case 4:
|
||||
stl_phys(addr, val);
|
||||
break;
|
||||
default: abort();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue