-------------------------------------------------------------------------
| 241 | |
| 242 | //------------------------------------------------------------------------- |
| 243 | int Debugger::OnExitProcess( |
| 244 | const DEBUG_EVENT& debugEvent, |
| 245 | HANDLE hProcess, |
| 246 | HANDLE hThread, |
| 247 | IDebugEventsHandler& debugEventsHandler) |
| 248 | { |
| 249 | OnExitThread(debugEvent.dwThreadId); |
| 250 | auto processId = debugEvent.dwProcessId; |
| 251 | |
| 252 | LOG_DEBUG << "Exit Process:" << processId; |
| 253 | |
| 254 | auto exitProcess = debugEvent.u.ExitProcess; |
| 255 | debugEventsHandler.OnExitProcess(hProcess, hThread, exitProcess); |
| 256 | |
| 257 | if (processHandles_.erase(processId) != 1) |
| 258 | THROW("Cannot find exited process."); |
| 259 | |
| 260 | return exitProcess.dwExitCode; |
| 261 | } |
| 262 | |
| 263 | //------------------------------------------------------------------------- |
| 264 | void Debugger::OnCreateThread( |