Mono.Debugger.Backend.SingleSteppingEngine.OperationNativeTrampoline.DoProcessEvent C# (CSharp) Method

DoProcessEvent() protected method

protected DoProcessEvent ( Inferior cevent, TargetEventArgs &args ) : EventResult
cevent Inferior
args TargetEventArgs
return EventResult
            protected override EventResult DoProcessEvent(Inferior.ChildEvent cevent,
							       out TargetEventArgs args)
            {
                Report.Debug (DebugFlags.SSE,
                      "{0} native trampoline event: {1}", sse, cevent);

                args = null;

                Inferior.StackFrame frame = inferior.GetCurrentFrame ();

                if (done)
                return EventResult.Completed;

                if (!entered_trampoline) {
                stack_pointer = frame.StackPointer;

                sse.do_step_native ();
                entered_trampoline = true;
                return EventResult.Running;
                }

                if (frame.StackPointer <= stack_pointer) {
                sse.do_next ();
                return EventResult.Running;
                }

                done = true;

                Instruction instruction = sse.Architecture.ReadInstruction (
                inferior, frame.Address);
                if ((instruction == null) || !instruction.HasInstructionSize) {
                sse.do_step_native ();
                return EventResult.Running;
                }

                if (instruction.InstructionType != Instruction.Type.Jump) {
                sse.do_step_native ();
                return EventResult.Running;
                }

                return EventResult.Completed;
            }
SingleSteppingEngine.OperationNativeTrampoline