Ejemplo n.º 1
0
        // Construct an instance of IEnumDebugPropertyInfo2 for the parameters collection only.
        private void CreateParameterProperties(uint radix, out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject)
        {
            elementsReturned = (uint)_parameters.Length;
            DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[_parameters.Length];

            for (int i = 0; i < propInfo.Length; i++)
            {
                AD7Property property = new AD7Property(this, _parameters[i], true);
                propInfo[i] = property.ConstructDebugPropertyInfo(radix, enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
            }

            enumObject = new AD7PropertyInfoEnum(propInfo);
        }
 int IDebugExpression2.EvaluateSync(
   enum_EVALFLAGS dwFlags, 
   uint dwTimeout, 
   IDebugEventCallback2 pExprCallback, 
   out IDebugProperty2 ppResult)
 {
   if (MySql.Debugger.Debugger.GetTagHashCode(_stackFrame._rs.OwningRoutine.SourceCode) !=
     DebuggerManager.Instance.Debugger.CurrentScope.OwningRoutine.Hash)
   {
     // This should never happen.
     ppResult = null;
     return VSConstants.E_NOTIMPL;
   }
   AD7Property prop = new AD7Property( _expr,_stackFrame.Node, _stackFrame._rs );
   ppResult = prop;
   // Send evaluation complete event
   DebuggerManager.Instance._events.ExpressionEvalCompleted( 
     _stackFrame.Node, ( IDebugExpression2 )this, ( IDebugProperty2 )prop );
   return VSConstants.S_OK;
 }
Ejemplo n.º 3
0
        // Construct an instance of IEnumDebugPropertyInfo2 for the combined locals and parameters.
        private void CreateLocalsPlusArgsProperties(uint radix, out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject)
        {
            elementsReturned = 0;

            int localsLength = 0;

            if (_locals != null)
            {
                localsLength      = _locals.Length;
                elementsReturned += (uint)localsLength;
            }

            if (_parameters != null)
            {
                elementsReturned += (uint)_parameters.Length;
            }
            DEBUG_PROPERTY_INFO[] propInfo = new DEBUG_PROPERTY_INFO[elementsReturned];

            if (_locals != null)
            {
                for (int i = 0; i < _locals.Length; i++)
                {
                    AD7Property property = new AD7Property(this, _locals[i], true);
                    propInfo[i] = property.ConstructDebugPropertyInfo(radix, enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
                }
            }

            if (_parameters != null)
            {
                for (int i = 0; i < _parameters.Length; i++)
                {
                    AD7Property property = new AD7Property(this, _parameters[i], true);
                    propInfo[localsLength + i] = property.ConstructDebugPropertyInfo(radix, enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
                }
            }

            enumObject = new AD7PropertyInfoEnum(propInfo);
        }
Ejemplo n.º 4
0
    // Construct an instance of IEnumDebugPropertyInfo2 for the parameters collection only.
    private void CreateParameterProperties(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject) {
      elementsReturned = (uint)mParams.Length;
      var propInfo = new DEBUG_PROPERTY_INFO[mParams.Length];

      for (int i = 0; i < propInfo.Length; i++) {
        AD7Property property = new AD7Property(mParams[i], mProcess, this);
        propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
      }

      propInfo = propInfo.OrderBy(i => i.bstrName).ToArray();
      enumObject = new AD7PropertyInfoEnum(propInfo);
    }
Ejemplo n.º 5
0
    // Construct an instance of IEnumDebugPropertyInfo2 for the combined locals and parameters.
    private void CreateLocalsPlusArgsProperties(out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject) {
      elementsReturned = 0;

      int localsLength = 0;

      if (mLocals != null) {
        localsLength = mLocals.Length;
        elementsReturned += (uint)localsLength;
      }

      if (mParams != null) {
        elementsReturned += (uint)mParams.Length;
      }
      var propInfo = new DEBUG_PROPERTY_INFO[elementsReturned];

      if (mLocals != null) {
        for (int i = 0; i < mLocals.Length; i++) {
          AD7Property property = new AD7Property(mLocals[i], this.mProcess, this);
          propInfo[i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
        }
      }

      if (mParams != null) {
        for (int i = 0; i < mParams.Length; i++) {
          AD7Property property = new AD7Property(mParams[i], this.mProcess, this);
          propInfo[localsLength + i] = property.ConstructDebugPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD);
        }
      }

      propInfo = propInfo.OrderBy(i => i.bstrName).ToArray();
      enumObject = new AD7PropertyInfoEnum(propInfo);
    }
Ejemplo n.º 6
0
 // This method evaluates the expression synchronously.
 int IDebugExpression2.EvaluateSync(enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, out IDebugProperty2 ppResult)
 {
     ppResult = new AD7Property(m_var, Process, StackFrame);
     return VSConstants.S_OK;
 }