Exemplo n.º 1
0
 /// <summary>
 /// Creates a new instance of the CustomStepCompleteEventArgs class.
 /// </summary>
 /// <param name="processController">Which IMDbgProcessController to store in the Object.</param>
 /// <param name="callbackArgs">Which CorStepCompleteEventArgs to encapsulate in this wrapper.</param>
 public CustomStepCompleteEventArgs(IMDbgProcessController processController,
                                    CorStepCompleteEventArgs callbackArgs)
     : base(processController)
 {
     this.callbackArgs = callbackArgs;
 }
Exemplo n.º 2
0
        private void StepCompleteEventHandler(Object sender, CorStepCompleteEventArgs e)
        {
            OriginalMDbgMessages.WriteLine("ManagedCallback::StepComplete");
            if (InternalHandleRawMode(ManagedCallbackType.OnStepComplete, e))
                return;

            // custom stepper handling
            if (customSteppers != null
                && customSteppers.Contains(e.Stepper))
            {
                using (var psc = new MDbgProcessStopController(this, e, false))
                {
                    var handler = (customSteppers[e.Stepper] as CustomStepperEventHandler);
                    customSteppers.Remove(e.Stepper);
                    handler(this, new CustomStepCompleteEventArgs(psc, e));
                }

                return; // this was custom stepper, no additional action necessary.
            }

            // we need to deliver step complete for cordbg skin, so that we can print
            // enhanced diagnostics. 
            if (HandleCustomPostCallback(ManagedCallbackType.OnStepComplete, e))
                return;

            // we will stop only if this callback is from our own stepper.
            if (e.Stepper == m_activeStepper)
            {
                m_activeStepper = null;
                e.Continue = false;
                InternalSignalRuntimeIsStopped(e.Thread, new StepCompleteStopReason(e.Stepper, e.StepReason));
            }
        }