internal DnThread(DnProcess ownerProcess, ICorDebugThread thread, int uniqueId, int uniqueIdProcess) { Process = ownerProcess; CorThread = new CorThread(thread); UniqueId = uniqueId; UniqueIdProcess = uniqueIdProcess; }
/// <summary> /// true if any managed callbacks are currently queued for the specified thread /// </summary> /// <param name="thread">Thread or null to check all threads</param> /// <returns></returns> public bool HasQueuedCallbacks(CorThread thread) { int queued; int hr = obj.HasQueuedCallbacks(thread == null ? null : thread.RawObject, out queued); return(hr >= 0 && queued != 0); }
internal DnThread(DnProcess ownerProcess, ICorDebugThread thread, int uniqueId, int uniqueIdProcess) { this.ownerProcess = ownerProcess; this.thread = new CorThread(thread); this.uniqueId = uniqueId; this.uniqueIdProcess = uniqueIdProcess; }
public void SetThread(CorThread thread) { if (thread == null) { throw new InvalidOperationException(); } ICorDebugEval ce; int hr = thread.RawObject.CreateEval(out ce); if (hr < 0 || ce == null) { throw new EvalException(hr, string.Format("Could not create an evaluator, HR=0x{0:X8}", hr)); } this.thread = thread; this.eval = new CorEval(ce); }
static List <ThreadInfo> GetThreadInfos(CorThread thread) { var process = thread.Process; var list = new List <ThreadInfo>(); if (process == null) { list.Add(new ThreadInfo(thread)); return(list); } foreach (var t in process.Threads) { list.Add(new ThreadInfo(t)); } return(list); }
internal IDebuggerThread FindThreadUI(DBG.CorThread thread) { dispatcher.VerifyAccess(); var dbg = theDebugger.Debugger; if (dbg == null) { return(null); } foreach (var p in dbg.Processes) { foreach (var t in p.Threads) { if (t.CorThread == thread) { return(new DebuggerThread(this, t)); } } } return(null); }
/// <summary> /// Sets the debug state of all managed threads /// </summary> /// <param name="state">New state</param> /// <param name="thread">Thread to exempt from the new state or null</param> public void SetAllThreadsDebugState(CorDebugThreadState state, CorThread thread = null) { int hr = obj.SetAllThreadsDebugState(state, thread == null ? null : thread.RawObject); }
public bool Equals(CorThread other) => !ReferenceEquals(other, null) && RawObject == other.RawObject;
/// <summary> /// Gets all frames in all chains /// </summary> /// <param name="frames">Frames buffer</param> /// <returns></returns> public IEnumerable <CorFrame> GetAllFrames(ICorDebugFrame[] frames) => CorThread.GetAllFrames(frames);
public ThreadInfos(CorThread thread, bool suspendOtherThreads) { this.thread = thread; this.list = GetThreadInfos(thread); this.suspendOtherThreads = suspendOtherThreads; }
public ThreadInfo(CorThread thread) { this.Thread = thread; this.State = thread.State; }
internal DnThread(DnProcess ownerProcess, ICorDebugThread thread, int incrementedId) { this.ownerProcess = ownerProcess; this.thread = new CorThread(thread); this.incrementedId = incrementedId; }
public bool Equals(CorThread other) { return(!ReferenceEquals(other, null) && RawObject == other.RawObject); }
/// <summary> /// Sets the debug state of all managed threads /// </summary> /// <param name="state">New state</param> /// <param name="thread">Thread to exempt from the new state or null</param> public void SetAllThreadsDebugState(CorDebugThreadState state, CorThread thread = null) => obj.SetAllThreadsDebugState(state, thread?.RawObject);
public ThreadInfo(CorThread thread) { Thread = thread; State = thread.State; }