0rp
March 28th, 2005, 15:01
hi,
i'm trying to use the PAGE_GUARD flag for memoryregions to get breakpoint functionality without using a real debugging loop.
to use PAGE_GUARD exceptions, i add an exceptionhandler to the SEH-chain with the AddVectoredExceptionHandler api
this works very well and i can detect memoryaccess. the problem is, that after accessing a PAGE_GUARDed region, the PAGE_GUARD-flag will be removed from that region and to detect more accesses, PAGE_GUARD must be re-enabled. the question is how or better when.
if i enable PAGE_GUARD in my exceptionhandler, the trapping instruction will never be executable, so this wouldn't work at all.
in other words: how can i re-enable PAGE_GUARD for memoryregions?
thx
i'm trying to use the PAGE_GUARD flag for memoryregions to get breakpoint functionality without using a real debugging loop.
to use PAGE_GUARD exceptions, i add an exceptionhandler to the SEH-chain with the AddVectoredExceptionHandler api
this works very well and i can detect memoryaccess. the problem is, that after accessing a PAGE_GUARDed region, the PAGE_GUARD-flag will be removed from that region and to detect more accesses, PAGE_GUARD must be re-enabled. the question is how or better when.
if i enable PAGE_GUARD in my exceptionhandler, the trapping instruction will never be executable, so this wouldn't work at all.
in other words: how can i re-enable PAGE_GUARD for memoryregions?
thx