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

Method HandleNotCreationalEvent

CppCoverage/Debugger.cpp:130–164  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

128
129 //-------------------------------------------------------------------------
130 Debugger::ProcessStatus
131 Debugger::HandleNotCreationalEvent(
132 const DEBUG_EVENT& debugEvent,
133 IDebugEventsHandler& debugEventsHandler,
134 HANDLE hProcess,
135 HANDLE hThread,
136 DWORD dwThreadId)
137 {
138 switch (debugEvent.dwDebugEventCode)
139 {
140 case EXIT_PROCESS_DEBUG_EVENT:
141 {
142 auto exitCode = OnExitProcess(debugEvent, hProcess, hThread, debugEventsHandler);
143 return ProcessStatus{exitCode, boost::none};
144 }
145 case EXIT_THREAD_DEBUG_EVENT: OnExitThread(dwThreadId); break;
146 case LOAD_DLL_DEBUG_EVENT:
147 {
148 const auto& loadDll = debugEvent.u.LoadDll;
149 Tools::ScopedAction scopedAction{ [&loadDll]{ CloseHandle(loadDll.hFile); } };
150 debugEventsHandler.OnLoadDll(hProcess, hThread, loadDll);
151 break;
152 }
153 case UNLOAD_DLL_DEBUG_EVENT:
154 {
155 debugEventsHandler.OnUnloadDll(hProcess, hThread, debugEvent.u.UnloadDll);
156 break;
157 }
158 case EXCEPTION_DEBUG_EVENT: return OnException(debugEvent, debugEventsHandler, hProcess, hThread);
159 case RIP_EVENT: OnRip(debugEvent.u.RipInfo); break;
160 default: LOG_DEBUG << "Debug event:" << debugEvent.dwDebugEventCode; break;
161 }
162
163 return ProcessStatus{};
164 }
165
166 //-------------------------------------------------------------------------
167 Debugger::ProcessStatus

Callers

nothing calls this directly

Calls 3

OnRipFunction · 0.85
OnLoadDllMethod · 0.45
OnUnloadDllMethod · 0.45

Tested by

no test coverage detected