. Minor bugfix on exceptionGuardPage.

This commit is contained in:
_0xbadc0de 2017-02-08 16:35:26 +00:00
parent 9c4bab40ac
commit ee855d6c50
2 changed files with 7 additions and 4 deletions

View File

@ -239,11 +239,14 @@ namespace GleeBug
*/ */
//Read but our bpx page is not bp on Read //Read but our bpx page is not bp on Read
//We shouldn't care about other stuff such as Write or Execute since these breakpoints are implemented with Access Violation. //We shouldn't care about other stuff such as Write or Execute since these breakpoints are implemented with Access Violation.
if ((exceptionRecord.ExceptionInformation[0]==0) && (!(bpxPage->second.Type & 0x2))) if (!(bpxPage->second.Type & 0x1))
{
if ((exceptionRecord.ExceptionInformation[0] == 0) && (!(bpxPage->second.Type & 0x2)))
{ {
//perhaps the program generated such exception //perhaps the program generated such exception
return; return;
} }
}
//generic breakpoint callback function. //generic breakpoint callback function.
cbBreakpoint(info); cbBreakpoint(info);

View File

@ -32,7 +32,7 @@ protected:
auto addr = mRegisters->Esi(); auto addr = mRegisters->Esi();
#endif //_WIN64 #endif //_WIN64
printf("Addr: 0x%p\n", addr); printf("Addr: 0x%p\n", addr);
if (mProcess->SetMemoryBreakpoint(addr, 0x1000, this, &MyDebugger::cbMemoryBreakpoint, MemoryType::Execute)) if (mProcess->SetMemoryBreakpoint(addr, 0x1000, this, &MyDebugger::cbMemoryBreakpoint, MemoryType::Access, false))
puts("Memory breakpoint set!"); puts("Memory breakpoint set!");
else else
puts("Failed to set memory breakpoint..."); puts("Failed to set memory breakpoint...");