Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 /// <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);
     }
 }
Exemplo n.º 3
0
 /// <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();
     }
 }