public DebuggerErrorEventArgs(Process process, int hresult, int errorCode, ManagedCallbackType callbackType) : base(process, callbackType) { m_hresult = hresult; m_errorCode = errorCode; }
public void DispatchEvent(ManagedCallbackType callback, CorEventArgs e) { try { if (m_callbackAttachedEvent != null) { isWaiting = true; m_callbackAttachedEvent.WaitOne(); // waits till callbacks are enabled } var d = m_callbacksArray[callback]; d(this, e); } catch (Exception ex) { var e2 = new ExceptionInCallbackEventArgs(e.Controller, ex); Debug.Assert(false, "Exception in callback: " + ex.ToString()); try { // we need to dispatch the exceptin in callback error, but we cannot // use DispatchEvent since throwing exception in ExceptionInCallback // would lead to infinite recursion. Debug.Assert(m_callbackAttachedEvent == null); var d = m_callbacksArray[ManagedCallbackType.OnExceptionInCallback]; d(this, e2); } catch (Exception ex2) { Debug.Assert(false, "Exception in Exception notification callback: " + ex2.ToString()); // ignore it -- there is nothing we can do. } e.Continue = e2.Continue; } }
public StepCompleteEventArgs(AppDomain appDomain, Thread thread, Stepper stepper, CorDebugStepReason stepReason, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_stepper = stepper; m_stepReason = stepReason; }
public UpdateModuleSymbolsEventArgs(AppDomain appDomain, Module managedModule, IStream stream, ManagedCallbackType callbackType) : base(appDomain, managedModule, callbackType) { m_stream = stream; }
public MDAEventArgs(MDA mda, Thread thread, Process proc, ManagedCallbackType callbackType) : base(proc, callbackType) { m_mda = mda; Thread = thread; //m_proc = proc; }
public ExceptionEventArgs(AppDomain appDomain, Thread thread, bool unhandled, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_unhandled = unhandled; }
public BreakpointEventArgs(AppDomain appDomain, Thread thread, Breakpoint managedBreakpoint, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_break = managedBreakpoint; }
/// <summary> /// Adds an MDbgStopOptionPolicy object to the collection of stop option policies, /// and registers it for a type of callback /// </summary> /// <param name="sop">The stop option policy to add.</param> /// <param name="callbackType">The type of callback to register the stop option /// policy for.</param> public void Add(MDbgStopOptionPolicy sop, ManagedCallbackType callbackType) { if (m_stopOptions[(int)callbackType] == null) { m_stopOptions[(int)callbackType] = new List <MDbgStopOptionPolicy>(); } m_stopOptions[(int)callbackType].Add(sop); }
public ExceptionUnwind2EventArgs(AppDomain appDomain, Thread thread, CorDebugExceptionUnwindCallbackType eventType, int flags, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_eventType = eventType; m_flags = flags; }
public FunctionRemapCompleteEventArgs(AppDomain appDomain, Thread thread, Function managedFunction, ManagedCallbackType callbackType ) : base(appDomain, thread, callbackType) { m_managedFunction = managedFunction; }
/// <summary> /// Expose direct dispatch logic so that other event dispatchers can /// use CorProcess's event handlers. /// </summary> /// <param name="callback">callback type to dispatch</param> /// <param name="e">event arguments used to dispatch</param> public void DirectDispatchEvent(ManagedCallbackType callback, CorEventArgs e) { Debug.Assert(callback == e.CallbackType); if (m_callbackAttachedEvent != null) { m_callbackAttachedEvent.Set(); } DispatchEvent(callback, e); }
public LogMessageEventArgs(AppDomain appDomain, Thread thread, int level, string logSwitchName, string message, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_level = level; m_logSwitchName = logSwitchName; m_message = message; }
public BreakpointSetErrorEventArgs(AppDomain appDomain, Thread thread, Breakpoint breakpoint, int errorCode, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_breakpoint = breakpoint; m_errorCode = errorCode; }
public LogSwitchEventArgs(AppDomain appDomain, Thread thread, int level, int reason, string logSwitchName, string parentName, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_level = level; m_reason = reason; m_logSwitchName = logSwitchName; m_parentName = parentName; }
public EditAndContinueRemapEventArgs(AppDomain appDomain, Thread thread, Function managedFunction, int accurate, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_managedFunction = managedFunction; m_accurate = accurate; }
public FunctionRemapOpportunityEventArgs(AppDomain appDomain, Thread thread, Function oldFunction, Function newFunction, int oldILoffset, ManagedCallbackType callbackType ) : base(appDomain, thread, callbackType) { m_oldFunction = oldFunction; m_newFunction = newFunction; m_oldILoffset = oldILoffset; }
public Exception2EventArgs(AppDomain appDomain, Thread thread, Frame frame, int offset, CorDebugExceptionCallbackType eventType, int flags, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_frame = frame; m_offset = offset; m_eventType = eventType; m_flags = flags; }
/// <summary> /// Handle the Debug Event of the MDbgProcess. /// </summary> void MDbgProcess_PostDebugEvent(object sender, CustomPostCallbackEventArgs e) { this.stopReason = e.CallbackType; switch (this.stopReason) { case ManagedCallbackType.OnException: CorExceptionEventArgs exceptionEventArgs = e.CallbackArgs as CorExceptionEventArgs; this.isExceptionUnhandled = exceptionEventArgs != null && exceptionEventArgs.Unhandled; break; default: break; } }
internal void DispatchEvent(ManagedCallbackType callback, CorEventArgs e) { try { // CorProcess.Continue has an extra abstraction layer. // - The fist call just sets m_callbackAttachedEvent // - future calls go to ICorDebugProcess::Continue. // This ensures that we don't dispatch any callbacks until // after CorProcess.Continue() is called. if (m_callbackAttachedEvent != null) { m_callbackAttachedEvent.WaitOne(); // waits till callbacks are enabled } Debug.Assert((int)callback >= 0 && (int)callback < m_callbacksArray.Length); Delegate d = m_callbacksArray[(int)callback]; if (d != null) { d.DynamicInvoke(new Object[] { this, e }); } } catch (Exception ex) { CorExceptionInCallbackEventArgs e2 = new CorExceptionInCallbackEventArgs(e.Controller, ex); Debug.Assert(false, "Exception in callback: " + ex.ToString()); try { // we need to dispatch the exception in callback error, but we cannot // use DispatchEvent since throwing exception in ExceptionInCallback // would lead to infinite recursion. Debug.Assert(m_callbackAttachedEvent == null); Delegate d = m_callbacksArray[(int)ManagedCallbackType.OnExceptionInCallback]; if (d != null) { d.DynamicInvoke(new Object[] { this, e2 }); } } catch (Exception ex2) { Debug.Assert(false, "Exception in Exception notification callback: " + ex2.ToString()); // ignore it -- there is nothing we can do. } e.Continue = e2.Continue; } }
// when process is first created wait till callbacks are enabled. internal void DispatchEvent(ManagedCallbackType callback, CorEventArgs e) { try { if (m_callbackAttachedEvent != null) { m_callbackAttachedEvent.WaitOne(); // waits till callbacks are enabled } Debug.Assert((int)callback >= 0 && (int)callback < m_callbacksArray.Length); Delegate d = m_callbacksArray[(int)callback]; if (d != null) { d.DynamicInvoke(new Object[] { this, e }); } } catch (Exception ex) { var e2 = new CorExceptionInCallbackEventArgs(e.Controller, ex); OriginalMDbgMessages.WriteLine("Exception in callback: " + ex); // DC Debug.Assert(false,"Exception in callback: "+ex.ToString()); try { // we need to dispatch the exceptin in callback error, but we cannot // use DispatchEvent since throwing exception in ExceptionInCallback // would lead to infinite recursion. Debug.Assert(m_callbackAttachedEvent == null); Delegate d = m_callbacksArray[(int)ManagedCallbackType.OnExceptionInCallback]; if (d != null) { d.DynamicInvoke(new Object[] { this, e2 }); } } catch (Exception ex2) { OriginalMDbgMessages.WriteLine("Exception in Exception notification callback: " + ex2); // DC Debug.Assert(false,"Exception in Exception notification callback: "+ex2.ToString()); // ignore it -- there is nothing we can do. } e.Continue = e2.Continue; } }
public CorExceptionUnwind2EventArgs(CorAppDomain appDomain, CorThread thread, CorDebugExceptionUnwindCallbackType eventType, int flags, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_eventType = eventType; m_flags = flags; }
public CorFunctionRemapOpportunityEventArgs(CorAppDomain appDomain, CorThread thread, CorFunction oldFunction, CorFunction newFunction, int oldILoffset, ManagedCallbackType callbackType ) : base(appDomain, thread, callbackType) { m_oldFunction = oldFunction; m_newFunction = newFunction; m_oldILoffset = oldILoffset; }
public CorEditAndContinueRemapEventArgs(CorAppDomain appDomain, CorThread thread, CorFunction managedFunction, int accurate, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_managedFunction = managedFunction; m_accurate = accurate; }
public CorUpdateModuleSymbolsEventArgs(CorAppDomain appDomain, CorModule managedModule, IStream stream, ManagedCallbackType callbackType) : base(appDomain, managedModule, callbackType) { m_stream = stream; }
public CorLogSwitchEventArgs(CorAppDomain appDomain, CorThread thread, int level, int reason, string logSwitchName, string parentName, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_level = level; m_reason = reason; m_logSwitchName = logSwitchName; m_parentName = parentName; }
public ClassEventArgs(AppDomain appDomain, Class managedClass, ManagedCallbackType callbackType) : base(appDomain, callbackType) { m_class = managedClass; }
public CorProcessEventArgs(CorProcess process, ManagedCallbackType callbackType) : base(process, callbackType) { }
public AppDomainBaseEventArgs(AppDomain ad, ManagedCallbackType callbackType) : base(ad, callbackType) { }
public ThreadEventArgs(AppDomain appDomain, Thread thread, ManagedCallbackType callbackType) : base(appDomain != null ? appDomain : thread.AppDomain, callbackType) { Thread = thread; }
public ExceptionInCallbackEventArgs(Controller controller, Exception exceptionThrown, ManagedCallbackType callbackType) : base(controller, callbackType) { m_exceptionThrown = exceptionThrown; }
public CorEventArgs(Controller controller, ManagedCallbackType callbackType) { m_controller = controller; m_continue = true; m_callbackType = callbackType; }
public EvalEventArgs(AppDomain appDomain, Thread thread, Eval eval, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_eval = eval; }
public ModuleEventArgs(AppDomain appDomain, Module managedModule, ManagedCallbackType callbackType) : base(appDomain, callbackType) { m_managedModule = managedModule; }
// Derived class overrides this methdos protected abstract void HandleEvent(ManagedCallbackType eventId, CorEventArgs args);
protected override void HandleEvent(ManagedCallbackType eventId, CorEventArgs args) { m_outer.InternalFireEvent(eventId, args); }
public AppDomainEventArgs(Process process, AppDomain ad, ManagedCallbackType callbackType) : base(process, callbackType) { m_ad = ad; }
public CorAppDomainBaseEventArgs(CorAppDomain ad, ManagedCallbackType callbackType) : base(ad, callbackType) { }
public ProcessEventArgs(Process process, ManagedCallbackType callbackType) : base(process, callbackType) { }
public CorLogMessageEventArgs(CorAppDomain appDomain, CorThread thread, int level, string logSwitchName, string message, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_level = level; m_logSwitchName = logSwitchName; m_message = message; }
public CorBreakpointEventArgs(CorAppDomain appDomain, CorThread thread, CorBreakpoint managedBreakpoint, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_break = managedBreakpoint; }
public CorMDAEventArgs(CorMDA mda, CorThread thread, CorProcess proc, ManagedCallbackType callbackType) : base(proc, callbackType) { m_mda = mda; Thread = thread; //m_proc = proc; }
public CorNativeStopEventArgs(CorProcess process, int threadId, IntPtr debugEvent, bool isOutOfBand, ManagedCallbackType callbackType) : base(process, callbackType) { m_threadId = threadId; m_debugEvent = debugEvent; m_isOutOfBand = isOutOfBand; }
public CorExceptionInCallbackEventArgs(CorController controller, Exception exceptionThrown, ManagedCallbackType callbackType) : base(controller, callbackType) { m_exceptionThrown = exceptionThrown; }
/** * Helper for invoking events. Checks to make sure that handlers * are hooked up to a handler before the handler is invoked. * * We want to allow maximum flexibility by our callers. As such, * we don't require that they call <code>e.Controller.Continue</code>, * nor do we require that this class call it. <b>Someone</b> needs * to call it, however. * * Consequently, if an exception is thrown and the process is stopped, * the process is continued automatically. */ void InternalFireEvent(ManagedCallbackType callbackType, CorEventArgs e) { CorProcess owner = e.Process; Debug.Assert(owner != null); try { owner.DispatchEvent(callbackType, e); } finally { // If the callback marked the event to be continued, then call Continue now. if (e.Continue) { e.Controller.Continue(false); } } }
public CorBreakpointSetErrorEventArgs(CorAppDomain appDomain, CorThread thread, CorBreakpoint breakpoint, int errorCode, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_breakpoint = breakpoint; m_errorCode = errorCode; }
public CorExceptionEventArgs(CorAppDomain appDomain, CorThread thread, bool unhandled, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_unhandled = unhandled; }
public CorFunctionRemapCompleteEventArgs(CorAppDomain appDomain, CorThread thread, CorFunction managedFunction, ManagedCallbackType callbackType ) : base(appDomain, thread, callbackType) { m_managedFunction = managedFunction; }
public CorEvalEventArgs(CorAppDomain appDomain, CorThread thread, CorEval eval, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_eval = eval; }
public CorException2EventArgs(CorAppDomain appDomain, CorThread thread, CorFrame frame, int offset, CorDebugExceptionCallbackType eventType, int flags, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_frame = frame; m_offset = offset; m_eventType = eventType; m_flags = flags; }
public CorModuleEventArgs(CorAppDomain appDomain, CorModule managedModule, ManagedCallbackType callbackType) : base(appDomain, callbackType) { m_managedModule = managedModule; }
/** * Helper for invoking events. Checks to make sure that handlers * are hooked up to a handler before the handler is invoked. * * We want to allow maximum flexibility by our callers. As such, * we don't require that they call <code>e.Controller.Continue</code>, * nor do we require that this class call it. <b>Someone</b> needs * to call it, however. * * Consequently, if an exception is thrown and the process is stopped, * the process is continued automatically. */ void InternalFireEvent(ManagedCallbackType callbackType,CorEventArgs e) { CorProcess owner; CorController c = e.Controller; Debug.Assert(c!=null); if(c is CorProcess) owner = (CorProcess)c ; else { Debug.Assert(c is CorAppDomain); owner = (c as CorAppDomain).Process; } Debug.Assert(owner!=null); try { owner.DispatchEvent(callbackType,e); } finally { if(e.Continue) { e.Controller.Continue(false); } } }
public CorClassEventArgs(CorAppDomain appDomain, CorClass managedClass, ManagedCallbackType callbackType) : base(appDomain, callbackType) { m_class = managedClass; }
public CorEventArgs(CorController controller, ManagedCallbackType callbackType) { m_controller = controller; m_continue = true; m_callbackType = callbackType; }
public CorDebuggerErrorEventArgs(CorProcess process, int hresult, int errorCode, ManagedCallbackType callbackType) : base(process, callbackType) { m_hresult = hresult; m_errorCode = errorCode; }
public CorAppDomainEventArgs(CorProcess process, CorAppDomain ad, ManagedCallbackType callbackType) : base(process, callbackType) { m_ad = ad; }
public CorAssemblyEventArgs(CorAppDomain appDomain, CorAssembly assembly, ManagedCallbackType callbackType) : base(appDomain, callbackType) { m_assembly = assembly; }
public CorThreadEventArgs(CorAppDomain appDomain, CorThread thread, ManagedCallbackType callbackType) : base(appDomain != null ? appDomain : thread.AppDomain, callbackType) { Thread = thread; }
public AssemblyEventArgs(AppDomain appDomain, Assembly assembly, ManagedCallbackType callbackType) : base(appDomain, callbackType) { m_assembly = assembly; }
public CorStepCompleteEventArgs(CorAppDomain appDomain, CorThread thread, CorStepper stepper, CorDebugStepReason stepReason, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_stepper = stepper; m_stepReason = stepReason; }
// constructor // Arguments: thread: thread on which the notification occurred // appDomain: appdomain in which the notification occurred // callbackType: the type of the callback for theis event public CorCustomNotificationEventArgs(CorThread thread, CorAppDomain appDomain, ManagedCallbackType callbackType) : base(appDomain, thread, callbackType) { m_thread = thread; }