コード例 #1
0
 /// <summary>
 /// Fires the <c>ExecutionInterrupt</c> event.
 /// </summary>
 /// <param name="reason">The reason for the interruption</param>
 internal void OnExecutionInterrupt(ExecutionInterruptReason reason)
 {
     if (ExecutionInterrupt != null)
     {
         ExecutionInterrupt(reason);
     }
 }
コード例 #2
0
ファイル: Engine.cs プロジェクト: lazanet/messylab
        /// <summary>
        /// Signals that the execution was interrupted due to hitting one or more
        /// breakpoints.
        /// </summary>
        protected void SignalBreakpoint()
        {
            ExecutionInterruptReason reason =
                new ExecutionInterruptReason(Debugger.Breakpoints.HitBreakpoints.ToArray());

            Debugger.OnExecutionInterrupt(reason);
            AllowedToContinue.Reset();
            AllowedToContinue.WaitOne();
        }
コード例 #3
0
ファイル: Engine.cs プロジェクト: lazanet/messylab
 /// <summary>
 /// Signals that the execution was interrupted due to hitting one or more
 /// breakpoints.
 /// </summary>
 protected void SignalBreakpoint()
 {
     ExecutionInterruptReason reason =
         new ExecutionInterruptReason(Debugger.Breakpoints.HitBreakpoints.ToArray());
     Debugger.OnExecutionInterrupt(reason);
     AllowedToContinue.Reset();
     AllowedToContinue.WaitOne();
 }
コード例 #4
0
            public virtual void HandleExecutionInterrupt(ExecutionInterruptReason reason)
            {
                // If (program stopped)
                if (reason.Exception != null && reason.Exception is NoProgramLoadedException)
                {
                    Controller.State = States.NotLoaded;

                    if (_restart)
                    {
                        Controller.StepInto(false);
                    }
                }
            }
コード例 #5
0
 public virtual void HandleExecutionInterrupt(ExecutionInterruptReason reason)
 {
 }
コード例 #6
0
        /// <summary>
        /// Handles the execution interruption by calling the handler of the current IState.
        /// </summary>
        /// <param name="reason">The interrupt reason.</param>
        protected virtual void HandleExecutionInterrupt(ExecutionInterruptReason reason)
        {
            var main = Platform.Gui.MainForm;
            // Invoke will most likely be required because
            // Debugger runs in a separate thread.
            if (main.InvokeRequired)
            {
                main.BeginInvoke(new Action<ExecutionInterruptReason>(HandleExecutionInterrupt), reason);
                return;
            }

            ExecutionInterruptReason = reason;
            if (CurrentIState != null) CurrentIState.HandleExecutionInterrupt(reason);
        }
コード例 #7
0
ファイル: Debugger.cs プロジェクト: lazanet/messylab
 /// <summary>
 /// Fires the <c>ExecutionInterrupt</c> event.
 /// </summary>
 /// <param name="reason">The reason for the interruption</param>
 internal void OnExecutionInterrupt(ExecutionInterruptReason reason)
 {
     if (ExecutionInterrupt != null)
     {
         ExecutionInterrupt(reason);
     }
 }