MCPcopy Create free account
hub / github.com/beefytech/Beef / ContinueDebugEvent

Method ContinueDebugEvent

IDEHelper/WinDebugger.cpp:3008–3063  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3006}
3007
3008void WinDebugger::ContinueDebugEvent()
3009{
3010 AutoCrit autoCrit(mDebugManager->mCritSect);
3011
3012 BF_ASSERT(mRunState != RunState_DebugEval_Done);
3013
3014 if (!mWantsDebugContinue)
3015 return;
3016
3017 if (!TryRunContinue())
3018 return;
3019
3020// if ((mRunState == RunState_DebugEval) && (mDebuggerWaitingThread->mThreadId != mDebugEvalThreadInfo.mThreadId))
3021// {
3022// // Don't process the 'mIsAtBreakpointAddress' stuff
3023// mWantsDebugContinue = false;
3024// mContinueEvent.Set();
3025// return;
3026// }
3027
3028 if ((mDebuggerWaitingThread->mIsAtBreakpointAddress == 0) && (mDebuggerWaitingThread->mStoppedAtAddress != 0))
3029 {
3030 auto breakpoint = FindBreakpointAt(mDebuggerWaitingThread->mStoppedAtAddress);
3031 if (breakpoint != NULL)
3032 {
3033 mDebuggerWaitingThread->mIsAtBreakpointAddress = mDebuggerWaitingThread->mStoppedAtAddress;
3034 }
3035 }
3036
3037 if (mDebuggerWaitingThread->mIsAtBreakpointAddress != 0)
3038 {
3039 if (!ContinueFromBreakpoint())
3040 {
3041 BfLogDbg("ContinueFromBreakpoint failed\n");
3042
3043 ClearCallStack();
3044 mDebuggerWaitingThread->mStoppedAtAddress = 0;
3045 mDebuggerWaitingThread->mIsAtBreakpointAddress = 0;
3046 mWantsDebugContinue = false;
3047 mContinueFromBreakpointFailed = true;
3048 mContinueEvent.Set();
3049 return;
3050 }
3051 }
3052
3053 if ((mRunState == RunState_Breakpoint) || (mRunState == RunState_Paused) || (mRunState == RunState_TargetUnloaded))
3054 {
3055 ClearCallStack();
3056 mRunState = RunState_Running;
3057 }
3058
3059 mDebuggerWaitingThread->mStoppedAtAddress = 0;
3060 mWantsDebugContinue = false;
3061 BF_ASSERT_REL(mDebuggerWaitingThread->mIsAtBreakpointAddress == 0);
3062 mContinueEvent.Set();
3063}
3064
3065static BOOL CALLBACK WdEnumWindowsProc(HWND hwnd, LPARAM lParam)

Callers 1

Debugger_ContinueFunction · 0.45

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected