1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Unknown memory breakpoint crash fix

This commit is contained in:
Brian Fiete 2025-04-05 12:01:53 -04:00
parent 42ba7d3df5
commit 40aa9e9a8b

View file

@ -2660,25 +2660,33 @@ bool WinDebugger::DoUpdate()
} }
} }
BF_ASSERT(foundBreakpoint != NULL); if (foundBreakpoint == NULL)
DbgSubprogram* subprogram = mDebugTarget->FindSubProgram(pcAddress);
if (CheckConditionalBreakpoint(foundBreakpoint, subprogram, pcAddress))
{ {
if (foundBreakpoint != NULL) BfLogDbg("Unknown memory breakpoint hit %p\n", pcAddress);
{ mDebugManager->mOutMessages.push_back(StrFormat("memoryBreak %s", EncodeDataPtr(pcAddress, false).c_str()));
mDebugManager->mOutMessages.push_back(StrFormat("memoryBreak %s", EncodeDataPtr(foundBreakpoint->mMemoryBreakpointInfo->mMemoryAddress, false).c_str())); mRunState = RunState_Paused;
mRunState = RunState_Paused; break;
}
mActiveBreakpoint = foundBreakpoint;
mBreakStackFrameIdx = -1;
RemoveTempBreakpoints();
BfLogDbg("Memory breakpoint hit: %p\n", foundBreakpoint);
} }
else else
ClearCallStack(); {
break; DbgSubprogram* subprogram = mDebugTarget->FindSubProgram(pcAddress);
if (CheckConditionalBreakpoint(foundBreakpoint, subprogram, pcAddress))
{
if (foundBreakpoint != NULL)
{
mDebugManager->mOutMessages.push_back(StrFormat("memoryBreak %s", EncodeDataPtr(foundBreakpoint->mMemoryBreakpointInfo->mMemoryAddress, false).c_str()));
mRunState = RunState_Paused;
}
mActiveBreakpoint = foundBreakpoint;
mBreakStackFrameIdx = -1;
RemoveTempBreakpoints();
BfLogDbg("Memory breakpoint hit: %p\n", foundBreakpoint);
}
else
ClearCallStack();
break;
}
} }
if ((mRunState == RunState_DebugEval) && (mDebugEvalThreadInfo.mThreadId == mDebuggerWaitingThread->mThreadId)) if ((mRunState == RunState_DebugEval) && (mDebugEvalThreadInfo.mThreadId == mDebuggerWaitingThread->mThreadId))