示例#1
0
        public bool MoveNext()
        {
            bool pRetVal = false;

            if (null != this.m_Current)
            {
                this.m_Current = null;
            }
            else
            {
                // Skip the first element
                this.m_Objects.Skip(1);
            }

            IDebugObject pObject = null;

            IDebugObject[] pObjects = new IDebugObject[1];
            int            fetched  = 0;

            this.m_Objects.Next(1, pObjects, out fetched);
            if (null != pObjects && fetched > 0)
            {
                pObject = pObjects[0];
                IDebugValue val = new CDebugValue(pObject, this.m_Context);
                this.m_Current = val;
                pRetVal        = true;
            }

            return(pRetVal);
        }
示例#2
0
    public IDebugValue GetElement(int index) {
      IDebugValue pRetVal = null;
      IDebugObject element = null;
      this.m_ArrayObject.GetElement((uint) index, out element);
      if (null != element) {
        pRetVal = new CDebugValue(element, this.m_Context);
      }

      return pRetVal;
    }
示例#3
0
        public IDebugValue GetElement(int index)
        {
            IDebugValue  pRetVal = null;
            IDebugObject element = null;

            this.m_ArrayObject.GetElement((uint)index, out element);
            if (null != element)
            {
                pRetVal = new CDebugValue(element, this.m_Context);
            }

            return(pRetVal);
        }
示例#4
0
    public bool MoveNext() {
      bool pRetVal = false;

      if (null != this.m_Current){
        this.m_Current = null;
      } else {
        // Skip the first element
        this.m_Objects.Skip(1);
      }

      IDebugObject pObject = null;
      IDebugObject[] pObjects = new IDebugObject[1];
      int fetched = 0;
      this.m_Objects.Next(1, pObjects, out fetched);
      if (null != pObjects && fetched > 0) {
        pObject = pObjects[0];
        IDebugValue val = new CDebugValue(pObject, this.m_Context);
        this.m_Current = val;
        pRetVal = true;

      }

      return pRetVal;
    }
示例#5
0
    public  IDebugValue Evaluate(IDebugValue containerValue, IDebugValue[] arguments) {
      IDebugValue pRetVal = null;
      uint argcount = 0;
      if( null != arguments ) {
        argcount = (uint ) arguments.Length;
      }

      IDebugObject[] args = new IDebugObject[argcount];
      if (null != args){
        if (argcount > 0){
          for (uint i = 0; i < argcount; i++){
            IDebugValue value = arguments[i] as IDebugValue;
            if (null != value){
              args[i] = ((CDebugValue ) value).GetObject();
            }
            else {
              return null;
            }
          }
        }
        IDebugObject containerObject = null;
        if (null != containerValue){
          containerObject = ((CDebugValue ) containerValue).GetObject();
        }
        IDebugBinder binder = this.m_Context.Binder;
        IDebugObject pObject = null;
        binder.Bind(containerObject, this.m_Field, out pObject);
        IDebugFunctionObject pFuncObject = null;
        pFuncObject = pObject as IDebugFunctionObject;
        if (null != pFuncObject) {
          IDebugObject result = null;
          pFuncObject.Evaluate(args, argcount, /*this.m_Context.timeout*/ 99999, out result);
          if (null != result) {
            pRetVal = new CDebugValue(result, this.m_Context);
          }
        }
      }
      return pRetVal;
    }
示例#6
0
    public  IDebugValue GetValue(IDebugValue container) {

      IDebugValue pRetVal = null;

      IDebugObject containerObject = null;
      if (this.m_Parent != null)
        container = this.m_Parent;
      if (null != container)
        containerObject = ((CDebugValue) container).GetObject();
      IDebugBinder binder = this.m_Context.Binder;
      if (null != binder){
        IDebugObject pObject = null;
        binder.Bind(containerObject, this.m_Field, out pObject);

        IDebugEnumField enumField = null;
        if ( null != (enumField = this.m_Field as IDebugEnumField)) {
          IDebugField underlyingField = null;
          enumField.GetUnderlyingSymbol(out underlyingField);
          if (null != underlyingField){
            IDebugObject underlyingObject = null;
            binder.Bind(pObject, underlyingField, out underlyingObject);
            if (null != underlyingObject){
              pObject = underlyingObject;
            }
          }
        }
        if (null != pObject){
          if(this.Type.Kind == TypeKind.Array)
            pRetVal = new CDebugArrayValue(pObject as IDebugArrayObject, this.m_Context);
          else
            pRetVal = new CDebugValue(pObject, this.m_Context);
        }
      }
      return pRetVal;
    }