internal Value(AppDomain appDomain, ICorDebugValue corValue) { if (corValue == null) { throw new ArgumentNullException("corValue"); } this.appDomain = appDomain; this.corValue = corValue; this.corValue_pauseSession = this.Process.PauseSession; this.isNull = corValue is ICorDebugReferenceValue && ((ICorDebugReferenceValue)corValue).IsNull() != 0; if (corValue is ICorDebugReferenceValue && ((ICorDebugReferenceValue)corValue).GetValue() == 0 && ((ICorDebugValue2)corValue).GetExactType() == null) { // We were passed null reference and no metadata description // (happens during CreateThread callback for the thread object) this.type = appDomain.ObjectType; } else { ICorDebugType exactType = ((ICorDebugValue2)this.CorValue).GetExactType(); this.type = DebugType.CreateFromCorType(appDomain, exactType); } }
internal Value(Process process, Expression expression, ICorDebugValue corValue) { if (corValue == null) { throw new ArgumentNullException("corValue"); } this.process = process; this.expression = expression; this.corValue = corValue; this.corValue_pauseSession = process.PauseSession; if (corValue.Is <ICorDebugReferenceValue>() && corValue.CastTo <ICorDebugReferenceValue>().Value == 0 && corValue.CastTo <ICorDebugValue2>().ExactType == null) { // We were passed null reference and no metadata description // (happens during CreateThread callback for the thread object) this.type = DebugType.Create(this.Process, null, "System.Object"); } else { ICorDebugType exactType = this.CorValue.CastTo <ICorDebugValue2>().ExactType; this.type = DebugType.Create(this.Process, exactType); } }
/// <summary> Puts the process into a paused state </summary> internal void NotifyPaused(PausedReason pauseReason) { AssertRunning(); pauseSession = new PauseSession(this, pauseReason); if (debuggeeState == null) { debuggeeState = new DebuggeeState(this); } }
/// <summary> Puts the process into a resumed state </summary> internal void NotifyResumed(DebuggeeStateAction action) { AssertPaused(); pauseSession = null; if (action == DebuggeeStateAction.Clear) { if (debuggeeState == null) throw new DebuggerException("Debugee state already cleared"); debuggeeState = null; this.ExpressionsCache.Clear(); } }
public void Continue() { try { AssertPaused(); pauseSession.NotifyHasExpired(); pauseSession = null; OnDebuggingResumed(); corProcess.Continue(0); } catch (System.Exception e) { } }
public void Break() { AssertRunning(); corProcess.Stop(100); // TODO: Hardcoded value pauseSession = new PauseSession(PausedReason.ForcedBreak); // TODO: Code duplication from enter callback // Remove expired threads and functions foreach (Thread thread in this.Threads) { thread.CheckExpiration(); } Pause(true); }
internal Value(AppDomain appDomain, ICorDebugValue corValue) { if (corValue == null) throw new ArgumentNullException("corValue"); this.appDomain = appDomain; this.corValue = corValue; this.corValue_pauseSession = this.Process.PauseSession; this.isNull = corValue is ICorDebugReferenceValue && ((ICorDebugReferenceValue)corValue).IsNull() != 0; if (corValue is ICorDebugReferenceValue && ((ICorDebugReferenceValue)corValue).GetValue() == 0 && ((ICorDebugValue2)corValue).GetExactType() == null) { // We were passed null reference and no metadata description // (happens during CreateThread callback for the thread object) this.type = appDomain.ObjectType; } else { ICorDebugType exactType = ((ICorDebugValue2)this.CorValue).GetExactType(); this.type = DebugType.CreateFromCorType(appDomain, exactType); } }
public void NotifyPaused(PauseSession pauseSession) { this.pauseSession = pauseSession; }
public void Continue() { try { AssertPaused(); pauseSession.NotifyHasExpired(); pauseSession = null; OnDebuggingResumed(); corProcess.Continue(0); } catch(System.Exception e) { } }
public void Break() { AssertRunning(); corProcess.Stop(100); // TODO: Hardcoded value pauseSession = new PauseSession(PausedReason.ForcedBreak); // TODO: Code duplication from enter callback // Remove expired threads and functions foreach(Thread thread in this.Threads) { thread.CheckExpiration(); } Pause(true); }
internal Value(Process process, Expression expression, ICorDebugValue corValue) { if (corValue == null) { throw new ArgumentNullException("corValue"); } this.process = process; this.expression = expression; this.corValue = corValue; this.corValue_pauseSession = process.PauseSession; if (corValue.Is<ICorDebugReferenceValue>() && corValue.CastTo<ICorDebugReferenceValue>().Value == 0 && corValue.CastTo<ICorDebugValue2>().ExactType == null) { // We were passed null reference and no metadata description // (happens during CreateThread callback for the thread object) this.type = DebugType.Create(this.Process, null, "System.Object"); } else { ICorDebugType exactType = this.CorValue.CastTo<ICorDebugValue2>().ExactType; this.type = DebugType.Create(this.Process, exactType); } }