Example #1
0
        /// <summary>
        /// Proceeds to the next operation when in an active debugging session
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        private string cmd_FLStep(string[] args)
        {
            if (!_isInStepMode)
            {
                return("Not in an active Debugging Session");
            }

            InterpreterStepResult stepResult = _stepInterpreter.Step();
            MemoryBuffer          res        = _stepInterpreter.GetActiveBufferInternal().Buffer;

            if (_stepInterpreter.Terminated)
            {
                _isInStepMode = false;
                res           = _stepInterpreter.GetActiveBufferInternal().Buffer;
            }

            TextureLoader.Update(Tex, CLAPI.ReadBuffer <byte>(res, (int)res.Size), (int)Tex.Width,
                                 (int)Tex.Height);

            return(stepResult.ToString());
        }
Example #2
0
        /// <summary>
        /// Simulates a step on a processor
        /// </summary>
        /// <returns>The Information about the current step(mostly for debugging)</returns>
        public InterpreterStepResult Step()
        {
            _stepResult = new InterpreterStepResult
            {
                SourceLine = Data.Source[_currentIndex]
            };

            if (Terminated)
            {
                _stepResult.Terminated = true;
            }
            else
            {
                Execute();
            }

            _stepResult.DebugBufferName    = _currentBuffer.ToString();
            _stepResult.ActiveChannels     = _activeChannels;
            _stepResult.DefinedBuffers     = Data.Defines.Select(x => x.Value.ToString()).ToList();
            _stepResult.BuffersInJumpStack = _jumpStack.Select(x => x.ActiveBuffer.ToString()).ToList();

            return(_stepResult);
        }