Robert Shearman rob@codeweavers.com writes:
Therefore this patch aids in debugging. It isn't perfect because of x86's variable length instructions, but it is fairly unlikely that an instruction will straddle a page boundary and the first page be readable and the second not.
Putting an exception handler around the whole function would probably be a better choice, this way it would catch data accesses too.