Mono.Debugger.Backend.SingleSteppingEngine.OperationStep.DoExecute C# (CSharp) Method

DoExecute() protected method

protected DoExecute ( ) : void
return void
            protected override void DoExecute()
            {
                Report.Debug (DebugFlags.SSE, "{0} step execute: {1}", sse, inferior.CurrentFrame);

                switch (StepMode) {
                case StepMode.Run:
                if (StepFrame != null)
                    sse.do_continue (StepFrame.Until);
                else
                    sse.do_continue ();
                break;

                case StepMode.NativeInstruction:
                sse.do_step_native ();
                break;

                case StepMode.NextInstruction:
                sse.do_next ();
                break;

                case StepMode.SourceLine:
                if (StepFrame == null)
                    StepFrame = sse.CreateStepFrame ();
                if (StepFrame == null)
                    sse.do_step ();
                else
                    Step (true);
                break;

                case StepMode.NextLine:
                // We cannot just set a breakpoint on the next line
                // since we do not know which way the program's
                // control flow will go; ie. there may be a jump
                // instruction before reaching the next line.
                StepFrame frame = sse.CreateStepFrame ();
                if (frame == null)
                    sse.do_next ();
                else {
                    StepFrame = new StepFrame (
                        null, StepMode.Finish, frame.StackFrame,
                        frame.Start, frame.End);
                    Step (true);
                }
                break;

                case StepMode.SingleInstruction:
                StepFrame = sse.CreateStepFrame (StepMode.SingleInstruction);
                Step (true);
                break;

                case StepMode.Finish:
                case StepMode.FinishNative:
                Step (true);
                break;

                default:
                throw new InvalidOperationException ();
                }
            }