public void ExitThread(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread) { // ICorDebugThread is still not dead and can be used for some operations if (process.Threads.Contains(pThread)) { EnterCallback(PausedReason.Other, "ExitThread " + pThread.GetID(), pThread); process.Threads[pThread].NotifyExited(); } else { EnterCallback(PausedReason.Other, "ExitThread " + pThread.GetID(), process.CorProcess); // .NET 4.0 - It seems that the API is reporting exits of threads without announcing their creation. // TODO: Remove in next .NET 4.0 beta and investigate process.TraceMessage("ERROR: Thread does not exist " + pThread.GetID()); } try { ExitCallback(); } catch (COMException e) { // For some reason this sometimes happens in .NET 1.1 process.TraceMessage("Continue failed in ExitThread callback: " + e.Message); } }
public CorDebugThread(ICorDebugThread _thread) { m_corThread = _thread; uint id; m_corThread.GetID(out id); ID = id; }
public void CreateThread(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread) { // We can not use pThread since it has not been added yet // and we continue from this callback anyway EnterCallback("CreateThread " + pThread.GetID(), pAppDomain); Thread thread = new Thread(process, pThread); process.threads.Add(thread); ExitCallback(); }
public void CreateThread(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread) { // We can not use pThread since it has not been added yet // and we continue from this callback anyway EnterCallback(PausedReason.Other, "CreateThread " + pThread.GetID(), pAppDomain); Thread thread = new Thread(process, pThread); process.Threads.Add(thread); thread.CorThread.SetDebugState(process.NewThreadState); ExitCallback(); }
public void ExitThread(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread) { Thread thread = process.GetThread(pThread); // ICorDebugThread is still not dead and can be used for some operations if (thread != null) { EnterCallback("ExitThread " + pThread.GetID(), pThread); thread.NotifyExited(); } else { EnterCallback("ExitThread " + pThread.GetID(), process.CorProcess); // .NET 4.0 - It seems that the API is reporting exits of threads without announcing their creation. // TODO: Remove in next .NET 4.0 beta and investigate process.TraceMessage("ERROR: Thread does not exist " + pThread.GetID()); } try { ExitCallback(); } catch (COMException e) { // For some reason this sometimes happens in .NET 1.1 process.TraceMessage("Continue failed in ExitThread callback: " + e.Message); } }
internal Thread(Process process, ICorDebugThread corThread) { this.process = process; this.corThread = corThread; this.id = CorThread.GetID(); }
void _UpdateActiveThread(ICorDebugThread thread) { if (null == thread) { int i33 = 33; } else { lock (dbgproc) { //dbgproc.idbgthd = thread; thread.GetID(out dbgproc.ActiveThreadID); //thread.GetActiveFrame(out dbgproc.idbgfrm); } } }
public CorThread(ICorDebugThread thread) { corThread = thread; corThread.GetID(out id); //corThread.G }