private void Debugger_ThreadExited(object sender, ThreadExitedEventArgs e) { _dispatcher.InvokeAsync(() => { var threads = _processes.First(p => p.ProcessId == e.Process.PID).Threads; threads.Remove(threads.First(th => th.OSID == e.Thread.TID)); }); }
private void Debugger_ThreadExited(object sender, ThreadExitedEventArgs e) { UI.InvokeAsync(() => { var process = _processes.FirstOrDefault(p => p.ProcessId == e.Process.PID); if (process == null) { return; } var threads = process.Threads; threads.Remove(threads.First(th => th.OSID == e.Thread.TID)); }); }
} // end CreateThread() public int ExitThread(uint ExitCode) { try { var eventArgs = new ThreadExitedEventArgs(m_debugger, ExitCode); int retVal = _RaiseEvent(m_debugger.ThreadExited, eventArgs); if (_ShouldOutput(retVal, eventArgs)) { _PsPipe.WriteObject(eventArgs); } return(retVal); } catch (Exception e) { Util.FailFast("Unexpected exception during event callback.", e); return(0); } } // end ExitThread()
private void Debugger_ThreadExited(object sender, ThreadExitedEventArgs e) { UI.InvokeAsync(() => { _log.Add(new EventLogItem <TargetThread>(EventLogItemType.ThreadExit, DateTime.Now, e.Thread)); }); }