Mono.Debugger.Backend.SingleSteppingEngine.Operation.CompletedOperation C# (CSharp) Method

CompletedOperation() public method

public CompletedOperation ( Inferior cevent, EventResult result, TargetEventArgs &args ) : EventResult
cevent Inferior
result EventResult
args TargetEventArgs
return EventResult
            public virtual EventResult CompletedOperation(Inferior.ChildEvent cevent, EventResult result, ref TargetEventArgs args)
            {
                Report.Debug (DebugFlags.EventLoop, "{0} operation completed: {1} {2} {3} - {4} {5}",
                      sse, this, cevent, result, ReportBreakpointHit, ReportSuspend);

                child = null;

                if (ReportSuspend) {
                result = EventResult.SuspendOperation;
                ReportSuspend = false;
                }

                if (result == EventResult.SuspendOperation) {
                if (!(this is InterruptibleOperation) || !sse.process.Session.Config.NestedBreakStates)
                    result = EventResult.Completed;
                }

                if (args != null)
                return result;

                //
                // We're done with our stepping operation, but first we need to
                // compute the new StackFrame.  While doing this, `frame_changed'
                // may discover that we need to do another stepping operation
                // before telling the user that we're finished.  This is to avoid
                // that we stop in things like a method's prologue or epilogue
                // code.  If that happens, we just continue stepping until we reach
                // the first actual source line in the method.
                //
                Operation new_operation = sse.frame_changed (inferior.CurrentFrame, this);

                if ((ReportBreakpointHit < 0) &&
                (CheckBreakpointsOnCompletion || (result == EventResult.SuspendOperation))) {
                int index;
                bool is_enabled;
                sse.process.BreakpointManager.LookupBreakpoint (
                    inferior.CurrentFrame, out index, out is_enabled);

                if ((index != 0) && is_enabled)
                    ReportBreakpointHit = index;
                }

                if (new_operation != null) {
                Report.Debug (DebugFlags.SSE,
                          "{0} frame changed at {1} => new operation {2}",
                          this, inferior.CurrentFrame, new_operation);

                if (cevent.Type == Inferior.ChildEventType.CHILD_HIT_BREAKPOINT)
                    ReportBreakpointHit = (int) cevent.Argument;
                if (result == EventResult.SuspendOperation)
                    ReportSuspend = true;

                sse.PushOperation (new_operation);

                args = null;
                return EventResult.Running;
                }

                //
                // Now we're really finished.
                //
                int bpt_hit = ReportBreakpointHit;
                ReportBreakpointHit = -1;

                if (cevent.Type == Inferior.ChildEventType.CHILD_HIT_BREAKPOINT)
                bpt_hit = (int) cevent.Argument;

                if (bpt_hit >= 0) {
                Breakpoint bpt = sse.lookup_breakpoint (bpt_hit);
                if ((bpt != null) && bpt.Breaks (sse.Thread.ID) && !bpt.HideFromUser) {
                    args = new TargetEventArgs (
                        TargetEventType.TargetHitBreakpoint, bpt.Index,
                        sse.current_frame);
                    return result;
                }
                }

                args = OperationCompleted (sse.current_frame, result == EventResult.SuspendOperation);
                return result;
            }

Same methods

SingleSteppingEngine.Operation::CompletedOperation ( bool suspended ) : void