Exemplo n.º 1
0
        /// <summary>
        /// Reads a static field
        /// </summary>
        /// <param name="token">Token of field</param>
        /// <param name="frame">Frame</param>
        /// <param name="hr">Updated with HRESULT</param>
        /// <returns></returns>
        public CorValue GetStaticFieldValue(uint token, CorFrame frame, out int hr)
        {
            ICorDebugValue value;

            hr = obj.GetStaticFieldValue(token, frame?.RawObject, out value);
            return(hr < 0 || value == null ? null : new CorValue(value));
        }
Exemplo n.º 2
0
        public bool InterceptCurrentException(CorFrame frame)
        {
            var t2 = obj as ICorDebugThread2;

            if (t2 == null)
            {
                return(false);
            }
            int hr = t2.InterceptCurrentException(frame.RawObject);

            return(hr >= 0);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Finds a frame. Can be called if <paramref name="frame"/> has been neutered
 /// </summary>
 /// <param name="frame">Frame</param>
 /// <returns></returns>
 public CorFrame FindFrame(CorFrame frame)
 {
     if (frame == null)
     {
         return(null);
     }
     foreach (var thread in threads.GetAll())
     {
         foreach (var f in thread.AllFrames)
         {
             if (f.StackStart == frame.StackStart && f.StackEnd == frame.StackEnd)
             {
                 return(f);
             }
         }
     }
     return(null);
 }
Exemplo n.º 4
0
 public bool Equals(CorFrame other)
 {
     return(!ReferenceEquals(other, null) &&
            RawObject == other.RawObject);
 }
Exemplo n.º 5
0
 public CorValue ReadStatic(CorFrame frame) => Class.GetStaticFieldValue(Token, frame);
Exemplo n.º 6
0
        /// <summary>
        /// Reads a static field
        /// </summary>
        /// <param name="token">Token of field</param>
        /// <param name="frame">Frame</param>
        /// <returns></returns>
        public CorValue GetStaticFieldValue(uint token, CorFrame frame)
        {
            int hr;

            return(GetStaticFieldValue(token, frame, out hr));
        }
Exemplo n.º 7
0
 public bool Equals(CorFrame other) => !ReferenceEquals(other, null) && RawObject == other.RawObject;
Exemplo n.º 8
0
 /// <summary>
 /// Reads a static field
 /// </summary>
 /// <param name="token">Token of field</param>
 /// <param name="frame">Frame</param>
 /// <returns></returns>
 public CorValue GetStaticFieldValue(uint token, CorFrame frame) => GetStaticFieldValue(token, frame, out int hr);
Exemplo n.º 9
0
 public CorValue ReadStatic(CorFrame frame)
 {
     return(cls.GetStaticFieldValue(token, frame));
 }