From 8e1ff5a12310462b05100f0f2ea22b991ea23943 Mon Sep 17 00:00:00 2001 From: gmh5225 <2315157@qq.com> Date: Wed, 22 Jun 2022 01:11:59 +0800 Subject: [PATCH] Fix another crash --- GleeBug/Debugger.Loop.Exception.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/GleeBug/Debugger.Loop.Exception.cpp b/GleeBug/Debugger.Loop.Exception.cpp index f6459c9..f104b75 100644 --- a/GleeBug/Debugger.Loop.Exception.cpp +++ b/GleeBug/Debugger.Loop.Exception.cpp @@ -240,15 +240,14 @@ namespace GleeBug //TODO: check if the right type is accessed (ExceptionInformation[0]) //FIXED: auto bpxPage = mProcess->memoryBreakpointPages.find(exceptionAddress & ~(PAGE_SIZE - 1)); - auto pageAddr = bpxPage->first; - auto pageProperties = bpxPage->second; - if(bpxPage == mProcess->memoryBreakpointPages.end()) { sprintf_s(error, "Process::memoryBreakPointPages data structure is incosistent, should dump page at 0x%p", (void*)(exceptionAddress & ~(PAGE_SIZE - 1))); cbInternalError(error); return; } + auto pageAddr = bpxPage->first; + auto pageProperties = bpxPage->second; //TODO: If I only have a page with Read bp and the exception was not on read, I don't execute the callback. Because since this was implemented with PAGE_GUARD, writtes or executes still trigger //This callback.