MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / OnCreateProcess

Method OnCreateProcess

CppCoverage/Debugger.cpp:222–240  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

220
221 //-------------------------------------------------------------------------
222 void Debugger::OnCreateProcess(
223 const DEBUG_EVENT& debugEvent,
224 IDebugEventsHandler& debugEventsHandler)
225 {
226 const auto& processInfo = debugEvent.u.CreateProcessInfo;
227 Tools::ScopedAction scopedAction{ [&processInfo]{ CloseHandle(processInfo.hFile); } };
228
229 LOG_DEBUG << "Create Process:" << debugEvent.dwProcessId;
230
231 if (!rootProcessId_ && processHandles_.empty())
232 rootProcessId_ = debugEvent.dwProcessId;
233
234 if (!processHandles_.emplace(debugEvent.dwProcessId, processInfo.hProcess).second)
235 THROW("Process id already exist");
236
237 debugEventsHandler.OnCreateProcess(processInfo);
238
239 OnCreateThread(processInfo.hThread, debugEvent.dwThreadId);
240 }
241
242 //-------------------------------------------------------------------------
243 int Debugger::OnExitProcess(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected