mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
exec: let cpu_watchpoint_insert accept larger watchpoints
Make cpu_watchpoint_insert accept watchpoints of any power-of-two size up to the target page size. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
parent
488d65772c
commit
0dc23828f1
1 changed files with 2 additions and 1 deletions
3
exec.c
3
exec.c
|
@ -1443,7 +1443,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue