/// <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); } }
/// <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(); }
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); } } }
public virtual void HandleExecutionInterrupt(ExecutionInterruptReason reason) { }
/// <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); }