public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { ManagedCallback managedCallback = GetProcessCallbackInterface(pAppDomain); if (managedCallback != null) { managedCallback.StepComplete(pAppDomain, pThread, pStepper, reason); } }
public ICorDebugStepper CreateStepper() { ICorDebugStepper ppStepper; Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; this.WrappedObject.CreateStepper(out out_ppStepper); ppStepper = ICorDebugStepper.Wrap(out_ppStepper); return(ppStepper); }
public Stepper(Function function) { this.function = function; corStepper = function.CorILFrame.CreateStepper(); JustMyCode = true; function.Thread.Steppers.Add(this); }
private Stepper(StackFrame stackFrame, StepperOperation operation, int[] stepRanges, string name, bool justMyCode) { this.stackFrame = stackFrame; this.operation = operation; this.stepRanges = stepRanges; this.name = name; this.corStepper = stackFrame.CorILFrame.CreateStepper(); this.ignore = false; this.StackFrame.Thread.Steppers.Add(this); if (justMyCode) { corStepper.SetUnmappedStopMask(CorDebugUnmappedStop.STOP_NONE); corStepper.CastTo<ICorDebugStepper2>().SetJMC(1); } }
internal Stepper GetStepper(ICorDebugStepper corStepper) { foreach(Stepper stepper in steppers) { if (stepper.IsCorStepper(corStepper)) { return stepper; } } throw new DebuggerException("Stepper is not in collection"); }
public override bool Equals(object o) { ICorDebugStepper casted = o as ICorDebugStepper; return((casted != null) && (casted.WrappedObject == wrappedObject)); }
public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { EnterCallback(PausedReason.StepComplete, "StepComplete (" + reason.ToString() + ")", pThread); Thread thread = process.GetThread(pThread); Stepper stepper = thread.GetStepper(pStepper); process.TraceMessage(" - stepper info: " + stepper.ToString()); thread.Steppers.Remove(stepper); stepper.OnStepComplete(); if (stepper.PauseWhenComplete) { if (process.SelectedThread.LastFunction.HasSymbols) { ExitCallback_Paused(); } else { // This can only happen when JMC is disabled (ie NET1.1 or StepOut) if (stepper.Operation == Stepper.StepperOperation.StepOut) { // Create new stepper and keep going process.TraceMessage(" - stepping out of code without symbols at " + process.SelectedThread.LastFunction.ToString()); new Stepper(process.SelectedThread.LastFunction, "Stepper out of code without symbols").StepOut(); ExitCallback_Continue(); } else { // NET1.1: There is extra step over stepper, just keep going process.TraceMessage(" - leaving code without symbols"); ExitCallback_Continue(); } } } else { ExitCallback_Continue(); } }
internal bool IsCorStepper(ICorDebugStepper corStepper) { return this.corStepper == corStepper; }
protected internal virtual void OnStepComplete(CorDebugStepReason reason) { this.corStepper = null; if (StepComplete != null) { StepComplete(this, new StepperEventArgs(this, reason)); } }
public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { EnterCallback(PausedReason.StepComplete, "StepComplete (" + reason.ToString() + ")", pThread); Thread thread = process.GetThread(pThread); Stepper stepper = thread.GetStepper(pStepper); StackFrame currentStackFrame = process.SelectedThread.MostRecentStackFrame; process.TraceMessage(" - stopped at {0} because of {1}", currentStackFrame.MethodInfo.FullName, stepper.ToString()); thread.Steppers.Remove(stepper); stepper.OnStepComplete(reason); if (stepper.Ignore) { // The stepper is ignored process.TraceMessage(" - ignored"); } else if (thread.CurrentStepIn != null && thread.CurrentStepIn.StackFrame.Equals(currentStackFrame) && thread.CurrentStepIn.IsInStepRanges((int)currentStackFrame.CorInstructionPtr)) { Stepper.StepIn(currentStackFrame, thread.CurrentStepIn.StepRanges, "finishing step in"); process.TraceMessage(" - finishing step in"); } else if (currentStackFrame.MethodInfo.StepOver) { if (process.Options.EnableJustMyCode) { currentStackFrame.MethodInfo.MarkAsNonUserCode(); process.TraceMessage(" - method {0} marked as non user code", currentStackFrame.MethodInfo.FullName); Stepper.StepIn(currentStackFrame, new int[] {0, int.MaxValue}, "seeking user code"); process.TraceMessage(" - seeking user code"); } else { Stepper.StepOut(currentStackFrame, "stepping out of non-user code"); process.TraceMessage(" - stepping out of non-user code"); } } else { // User-code method pauseOnNextExit = true; process.TraceMessage(" - pausing in user code"); } ExitCallback(); }