public StepCompleteEventArgs(AppDomain appDomain, Thread thread, Stepper stepper, CorDebugStepReason stepReason) : base(appDomain, thread) { m_stepper = stepper; m_stepReason = stepReason; }
public StepCompleteEventArgs(DebuggedAppDomain ad, DebuggedThread thread, Stepper step, CorDebugStepReason reason) : base(ad, thread) { m_step = step; m_reason = reason; }
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 StepCompleteDebugCallbackEventArgs(ICorDebugAppDomain?pAppDomain, ICorDebugThread?pThread, ICorDebugStepper?pStepper, CorDebugStepReason reason) : base(pAppDomain) { AppDomain = pAppDomain; Thread = pThread; Stepper = pStepper; Reason = reason; }
public StepCompleteEventArgs(AppDomain appDomain, Thread thread, Stepper stepper, CorDebugStepReason stepReason, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_stepper = stepper; m_stepReason = stepReason; }
public StepCompleteDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) : base(pAppDomain) { this.AppDomain = pAppDomain; this.Thread = pThread; this.Stepper = pStepper; this.Reason = reason; }
protected internal virtual void OnStepComplete(CorDebugStepReason reason) { this.corStepper = null; if (StepComplete != null) { StepComplete(this, new StepperEventArgs(this, reason)); } }
protected override unsafe int OnStepComplete( CorDebugAppDomain pAppDomain, CorDebugThread pThread, CorDebugStepper pStepper, CorDebugStepReason reason) { StepComplete?.Invoke(this, pAppDomain, pThread, pStepper, reason); return(Continue()); }
public void StepComplete(IntPtr pAppDomain, IntPtr pThread, IntPtr pStepper, CorDebugStepReason reason) { Call(delegate { _managedCallback.StepComplete( _connector.MarshalAs <ICorDebugAppDomain>(pAppDomain), _connector.MarshalAs <ICorDebugThread>(pThread), _connector.MarshalAs <ICorDebugStepper>(pStepper), reason); }); }
public void StepComplete(IntPtr pAppDomain, IntPtr pThread, IntPtr pStepper, CorDebugStepReason reason) { Call(delegate { _managedCallback.StepComplete( _connector.MarshalAs<ICorDebugAppDomain>(pAppDomain), _connector.MarshalAs<ICorDebugThread>(pThread), _connector.MarshalAs<ICorDebugStepper>(pStepper), reason); }); }
public void StepComplete(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pStepper, CorDebugStepReason reason) { Call(delegate { callbackSwitch.StepComplete( MTA2STA.MarshalIntPtrTo<ICorDebugAppDomain>(pAppDomain), MTA2STA.MarshalIntPtrTo<ICorDebugThread>(pThread), MTA2STA.MarshalIntPtrTo<ICorDebugStepper>(pStepper), reason ); }); }
void ICorDebugManagedCallback.StepComplete( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugStepper stepper, CorDebugStepReason stepReason) { if (DebugOutput) { Console.WriteLine("info: StepComplete"); } appDomain.Continue(0); }
public void StepComplete( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugStepper step, CorDebugStepReason reason) { m_delegate.OnStepComplete( new StepCompleteEventArgs( new DebuggedAppDomain(appDomain), new DebuggedThread(thread), new Stepper(step), reason)); }
public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { try { _EnterCallback(); _UpdateActiveThread(pThread); bool _isspecial; lock (dbgproc) { _isspecial = _IsSourceAtSpecialPosition_unlocked(); } if (_isspecial) { dbgproc._StepDirect(false, false); return; // Don't fire this callback event; fire the next one. } lock (dbgproc) { #if DEBUG if (!dbgproc.IsStepping) { dbgproc.dout.WriteLine("DEBUG: StepComplete: (!dbgproc.IsStepping)"); } #endif dbgproc.IsStepping = false; { //dbgproc.dout.WriteLine("0: -"); dbgproc.ShowCurrentLine_unlocked(); } } _CallbackEvent("StepComplete"); } catch (Exception e) { _CallbackException(e); } }
public virtual void StepComplete( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugStepper stepper, CorDebugStepReason reason) { this.DefaultHandler(appDomain); }
public StepStopState(CorDebugStepReason stepReason) : base(DebuggerStopReason.Step) { this.stepReason = stepReason; }
public void StepComplete(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pStepper, CorDebugStepReason reason) { this.WrappedObject.StepComplete(pAppDomain, pThread, pStepper, reason); }
public virtual void OnStepComplete(AppDomain appDomainRef, Thread threadRef, Stepper stepperRef, CorDebugStepReason reason) { _handleEvent(ManagedCallbackType.OnStepComplete, new StepCompleteEventArgs(appDomainRef, threadRef, stepperRef, reason, ManagedCallbackType.OnStepComplete)); }
public void StepComplete(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pStepper, CorDebugStepReason reason) { Call(delegate { callbackSwitch.StepComplete( MTA2STA.MarshalIntPtrTo <ICorDebugAppDomain>(pAppDomain), MTA2STA.MarshalIntPtrTo <ICorDebugThread>(pThread), MTA2STA.MarshalIntPtrTo <ICorDebugStepper>(pStepper), reason ); }); }
public StepperEventArgs(Stepper stepper, CorDebugStepReason reason) { this.stepper = stepper; this.reason = reason; }
public StepperEventArgs(Stepper stepper, CorDebugStepReason reason) : base(stepper.Process) { this.stepper = stepper; this.reason = reason; }
public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { Log("Step completed. ({0})", reason); var domain = GetProcessWrapper(pAppDomain).GetAppDomain(pAppDomain); var thread = domain.GetThread(pThread); var stepper = domain.GetStepper(pStepper); var eventArgs = new StepperEventArgs(domain, thread, stepper); if (thread.CurrentFrame.IsUserCode) { domain.DispatchStepCompletedEvent(eventArgs); } else { Log("Non-user code detected. Stepping out."); thread.CurrentFrame.CreateStepper().StepOut(); eventArgs.Continue = true; } FinalizeEvent(eventArgs); }
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(); } }
public virtual void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { pAppDomain.Continue(0); }
public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { throw new NotImplementedException(); }
protected abstract int OnStepComplete( CorDebugAppDomain pAppDomain, CorDebugThread pThread, CorDebugStepper pStepper, CorDebugStepReason reason);
void ICorDebugManagedCallback.StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
int ICorDebugManagedCallback.StepComplete (CorDebugAppDomain pAppDomain, CorDebugThread pThread, CorDebugStepper pStepper, CorDebugStepReason reason) { TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetStopped); args.Process = GetProcess (pAppDomain.Process); args.Thread = pAppDomain.Process.GetThread (pThread); args.Backtrace = new Backtrace (new CorDebugBacktrace (pThread, this)); OnTargetEvent (args); SetActiveThread (pThread); return 0; }
public StepPauseState(CorDebugStepReason stepReason) : base(DebuggerPauseReason.Step) { this.stepReason = stepReason; }
public ManagedCallbackStepComplete (CorDebugThread thread, CorDebugStepper stepper, CorDebugStepReason reason) : base (thread) { m_stepper = stepper; m_reason = reason; }
public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { pAppDomain.Continue(0); }
void ICorDebugManagedCallback.StepComplete(IntPtr pAppDomain, IntPtr pThread, IntPtr pStepper, CorDebugStepReason reason) { dbg.OnManagedCallbackFromAnyThread(() => new StepCompleteDebugCallbackEventArgs(I <ICorDebugAppDomain>(pAppDomain), I <ICorDebugThread>(pThread), I <ICorDebugStepper>(pStepper), reason)); }
public CorStepCompleteEventArgs(CorAppDomain appDomain, CorThread thread, CorStepper stepper, CorDebugStepReason stepReason) : base(appDomain, thread) { m_stepper = stepper; m_stepReason = stepReason; }
public void StepComplete(ICorDebugAppDomain appDomain, ICorDebugThread thd, ICorDebugStepper stepper, CorDebugStepReason reason) { }
public static void StepComplete(this ICorDebugManagedCallback instance, IntPtr pAppDomain, IntPtr pThread, IntPtr pStepper, CorDebugStepReason reason) { instance.StepComplete(pAppDomain, pThread, pStepper, reason); }
public StepCompleteStopReason(CorStepper stepper, CorDebugStepReason stepReason) { Debug.Assert(stepper != null); m_stepReason = stepReason; m_stepper = stepper; }
public ManagedCallbackStepComplete(CorDebugThread thread, CorDebugStepper stepper, CorDebugStepReason reason) : base(thread) { m_stepper = stepper; m_reason = reason; }
int ICorDebugManagedCallback.StepComplete(CorDebugAppDomain pAppDomain, CorDebugThread pThread, CorDebugStepper pStepper, CorDebugStepReason reason) { TargetEventArgs args = new TargetEventArgs(TargetEventType.TargetStopped); args.Process = GetProcess(pAppDomain.Process); args.Thread = pAppDomain.Process.GetThread(pThread); args.Backtrace = new Backtrace(new CorDebugBacktrace(pThread, this)); OnTargetEvent(args); SetActiveThread(pThread); return(0); }
public override bool ShouldBreak(BreakpointDef breakpointDef) { bool fStop = true; CorDebugStepReason reason; //optimize, optimize, optimize No reason to get list of threads, and get thread stack for each step!!! ushort flags = breakpointDef.m_flags; int depthOld = (int)m_frame.DepthnanoCLR; int depthNew = (int)breakpointDef.m_depth; int dDepth = depthNew - depthOld; if ((flags & BreakpointDef.c_STEP) != 0) { if ((flags & BreakpointDef.c_STEP_IN) != 0) { if (this.Process.Engine.Capabilities.ExceptionFilters && breakpointDef.m_depthExceptionHandler == BreakpointDef.c_DEPTH_STEP_INTERCEPT) { reason = CorDebugStepReason.STEP_INTERCEPT; } else { reason = CorDebugStepReason.STEP_CALL; } } else if ((flags & BreakpointDef.c_STEP_OVER) != 0) { reason = CorDebugStepReason.STEP_NORMAL; } else { if (this.Process.Engine.Capabilities.ExceptionFilters & breakpointDef.m_depthExceptionHandler == BreakpointDef.c_DEPTH_STEP_EXCEPTION_HANDLER) { reason = CorDebugStepReason.STEP_EXCEPTION_HANDLER; } else { reason = CorDebugStepReason.STEP_RETURN; } } } else if ((flags & BreakpointDef.c_EXCEPTION_CAUGHT) != 0) { reason = CorDebugStepReason.STEP_EXCEPTION_HANDLER; if (dDepth > 0) { fStop = false; } else if (dDepth == 0) { fStop = (this.Debugging_Execution_BreakpointDef.m_flags & BreakpointDef.c_STEP_OVER) != 0; } else { fStop = true; } } else if ((flags & BreakpointDef.c_THREAD_TERMINATED) != 0) { reason = CorDebugStepReason.STEP_EXIT; this.Active = false; fStop = false; } else { Debug.Assert(false); throw new ApplicationException("Invalid stepper hit received"); } if (m_ranges != null && reason == CorDebugStepReason.STEP_NORMAL && breakpointDef.m_depth == this.Debugging_Execution_BreakpointDef.m_depth) { foreach (COR_DEBUG_STEP_RANGE range in m_ranges) { if (Utility.InRange(breakpointDef.m_IP, range.startOffset, range.endOffset - 1)) { fStop = false; break; } } Debug.Assert(Utility.FImplies(m_ranges != null && m_ranges.Length == 1, fStop)); } if (fStop && reason != CorDebugStepReason.STEP_EXIT) { uint depth = breakpointDef.m_depth; CorDebugFrame frame = this.m_thread.Chain.GetFrameFromDepthnanoCLR(depth); m_ranges = null; Initialize(frame); //Will callback with wrong reason if stepping through internal calls????? //If we don't stop at an internal call, we need to reset/remember the range somehow? //This might be broken if a StepRange is called that causes us to enter an internal function fStop = !m_frame.Function.IsInternal; } m_reasonStopped = reason; return(fStop); }
public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { EnterCallback(PausedReason.StepComplete, "StepComplete (" + reason.ToString() + ")", pThread); Thread thread = process.Threads[pThread]; Stepper stepper = process.GetStepper(pStepper); StackFrame currentStackFrame = process.SelectedThread.MostRecentStackFrame; process.TraceMessage(" - stopped at {0} because of {1}", currentStackFrame.MethodInfo.FullName, stepper.ToString()); process.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.IP)) { 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(); }
public void StepComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugStepper pStepper, CorDebugStepReason reason) { EnterCallback("StepComplete (" + reason.ToString() + ")", pThread); Thread thread = process.GetThread(pThread); Stepper stepper = process.GetStepper(pStepper); StackFrame currentStackFrame = thread.MostRecentStackFrame; process.TraceMessage(" - stopped at {0} because of {1}", currentStackFrame.MethodInfo.FullName, stepper.ToString()); process.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.IP)) { Stepper.StepIn(currentStackFrame, thread.CurrentStepIn.StepRanges, "finishing step in"); process.TraceMessage(" - finishing step in"); } else if (currentStackFrame.IsNonUserCode) { if (process.Options.EnableJustMyCode) { currentStackFrame.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 RequestPause(thread).Break = true; process.TraceMessage(" - pausing in user code"); } ExitCallback(); }
void ICorDebugManagedCallback.StepComplete(ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugStepper stepper, CorDebugStepReason stepReason) { HandleEvent(ManagedCallbackType.OnStepComplete, new CorStepCompleteEventArgs(appDomain == null ? null : new CorAppDomain(appDomain), thread == null ? null : new CorThread(thread), stepper == null ? null : new CorStepper(stepper), stepReason, ManagedCallbackType.OnStepComplete)); }
public CorStepCompleteEventArgs(CorAppDomain appDomain, CorThread thread, CorStepper stepper, CorDebugStepReason stepReason, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_stepper = stepper; m_stepReason = stepReason; }
public override bool ShouldBreak (BreakpointDef breakpointDef) { bool fStop = true; CorDebugStepReason reason; //optimize, optimize, optimize No reason to get list of threads, and get thread stack for each step!!! ushort flags = breakpointDef.m_flags; int depthOld = (int)m_frame.DepthTinyCLR; int depthNew = (int)breakpointDef.m_depth; int dDepth = depthNew - depthOld; if ((flags & BreakpointDef.c_STEP) != 0) { if ((flags & BreakpointDef.c_STEP_IN) != 0) { if (this.Process.Engine.Capabilities.ExceptionFilters && breakpointDef.m_depthExceptionHandler == BreakpointDef.c_DEPTH_STEP_INTERCEPT) { reason = CorDebugStepReason.STEP_INTERCEPT; } else { reason = CorDebugStepReason.STEP_CALL; } } else if ((flags & BreakpointDef.c_STEP_OVER) != 0) { reason = CorDebugStepReason.STEP_NORMAL; } else { if (this.Process.Engine.Capabilities.ExceptionFilters & breakpointDef.m_depthExceptionHandler == BreakpointDef.c_DEPTH_STEP_EXCEPTION_HANDLER) { reason = CorDebugStepReason.STEP_EXCEPTION_HANDLER; } else { reason = CorDebugStepReason.STEP_RETURN; } } } else if ((flags & BreakpointDef.c_EXCEPTION_CAUGHT) != 0) { reason = CorDebugStepReason.STEP_EXCEPTION_HANDLER; if (dDepth > 0) fStop = false; else if (dDepth == 0) fStop = (this.Debugging_Execution_BreakpointDef.m_flags & BreakpointDef.c_STEP_OVER) != 0; else fStop = true; } else if ((flags & BreakpointDef.c_THREAD_TERMINATED) != 0) { reason = CorDebugStepReason.STEP_EXIT; this.Active = false; fStop = false; } else { Debug.Assert (false); throw new ApplicationException ("Invalid stepper hit received"); } if (m_ranges != null && reason == CorDebugStepReason.STEP_NORMAL && breakpointDef.m_depth == this.Debugging_Execution_BreakpointDef.m_depth) { foreach (COR_DEBUG_STEP_RANGE range in m_ranges) { if (Utility.InRange (breakpointDef.m_IP, range.startOffset, range.endOffset - 1)) { fStop = false; break; } } Debug.Assert (Utility.FImplies (m_ranges != null && m_ranges.Length == 1, fStop)); } if (fStop && reason != CorDebugStepReason.STEP_EXIT) { uint depth = breakpointDef.m_depth; CorDebugFrame frame = this.m_thread.Chain.GetFrameFromDepthTinyCLR (depth); m_ranges = null; Initialize (frame); //Will callback with wrong reason if stepping through internal calls????? //If we don't stop at an internal call, we need to reset/remember the range somehow? //This might be broken if a StepRange is called that causes us to enter an internal function fStop = !m_frame.Function.IsInternal; } m_reasonStopped = reason; return fStop; }