Philippe Mathieu-Daudé <phi...@redhat.com> writes:
> On 6/3/20 2:46 PM, Philippe Mathieu-Daudé wrote: >> On 6/3/20 1:24 PM, Alex Bennée wrote: >>> There is no particular reason why you can't have a watchpoint in TCG >>> that covers a large chunk of the address space. We could be clever >>> about it but these cases are pretty rare and we can assume the user >>> will expect a little performance degradation. >>> >>> NB: In my testing gdb will silently squash a watchpoint like: >>> >>> watch (char[0x7fffffffff]) *0x0 >>> >>> to a 4 byte watchpoint. Practically it will limit the maximum size >>> based on max-value-size. However given enough of a tweak the sky is >>> the limit. >>> >>> Reported-by: Alexander Bulekov <alx...@bu.edu> >>> Signed-off-by: Alex Bennée <alex.ben...@linaro.org> >>> >>> --- >>> v2 >>> - use cleaner in_page = -(addr | TARGET_PAGE_MASK) logic per rth >> >> Can we have a macro for this? >> Maybe QEMU_IN_PAGE_OFFSET(addr, TARGET_PAGE_MASK)? >> or QEMU_OFFSET_IN_PAGE()... > > As this is queued, I suppose the implicit answer is "no." Richard took it into tcg/next as is. I think having a macro may well be nice clean-up but I struggled to pick a good include location so left it for a future clean-up series ;-) -- Alex Bennée