protected abstract int OnException2( CorDebugAppDomain pAppDomain, CorDebugThread pThread, CorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags);
public virtual void Exception( ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { pAppDomain.Continue(0); }
public Exception2DebugCallbackEventArgs(ICorDebugAppDomain?pAppDomain, ICorDebugThread?pThread, ICorDebugFrame?pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, CorDebugExceptionFlags dwFlags) : base(pAppDomain) { AppDomain = pAppDomain; Thread = pThread; Frame = pFrame; Offset = nOffset; EventType = dwEventType; Flags = dwFlags; }
public ExceptionThrownStopReason(CorAppDomain appDomain, CorThread thread, CorFrame frame, int offset, CorDebugExceptionCallbackType eventType, int flags) { m_appDomain = appDomain; m_thread = thread; m_frame = frame; m_offset = offset; m_eventtype = eventType; m_flags = flags; }
protected override unsafe int OnException2( CorDebugAppDomain pAppDomain, CorDebugThread pThread, CorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { Exception2?.Invoke(this, pAppDomain, pThread, pFrame, nOffset, dwEventType, dwFlags); return(Continue()); }
public Exception2EventArgs(AppDomain appDomain, Thread thread, Frame frame, int offset, CorDebugExceptionCallbackType eventType, int flags) : base(appDomain, thread) { m_frame = frame; m_offset = offset; m_eventType = eventType; m_flags = flags; }
void ICorDebugManagedCallback2.Exception( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugFrame frame, uint offset, CorDebugExceptionCallbackType eventType, uint flags) { if (DebugOutput) { Console.WriteLine("info: Exception2"); } ExceptionHandled?.Invoke(this, new ExceptionEventArgs(appDomain, thread, frame, offset, eventType, flags)); appDomain.Continue(0); }
public ExceptionEventArgs( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugFrame frame, uint offset, CorDebugExceptionCallbackType eventType, uint flags) { AppDomain = appDomain; Thread = thread; Frame = frame; Offset = offset; EventType = eventType; Flags = flags; }
public ManagedCallbackException(CorDebugThread thread, CorDebugFrame frame, uint ip, CorDebugExceptionCallbackType type) : base(thread) { m_type = type; m_frame = frame; m_ip = ip; if (!thread.Engine.Capabilities.ExceptionFilters) { m_fSuspendThreadEvents = (m_type == CorDebugExceptionCallbackType.DEBUG_EXCEPTION_FIRST_CHANCE) || (m_type == CorDebugExceptionCallbackType.DEBUG_EXCEPTION_USER_FIRST_CHANCE); } //Because we are now doing two-pass exception handling, the stack's IP isn't going to be the handler, so //we have to use the IP sent via the breakpointDef and not the stack frame. if (m_frame != null && m_frame.Function != null && m_frame.Function.HasSymbols) { m_ip = m_frame.Function.GetILCLRFromILTinyCLR(m_ip); } }
public void Exception(IntPtr pAppDomain, IntPtr pThread, IntPtr pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { Call(delegate { callbackSwitch.Exception2( MTA2STA.MarshalIntPtrTo<ICorDebugAppDomain>(pAppDomain), MTA2STA.MarshalIntPtrTo<ICorDebugThread>(pThread), MTA2STA.MarshalIntPtrTo<ICorDebugFrame>(pFrame), nOffset, dwEventType, dwFlags ); }); }
public void Exception([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFrame pFrame, [In] uint nOffset, [In] CorDebugExceptionCallbackType dwEventType, [In] uint dwFlags) { throw new NotImplementedException(); }
public virtual void ExceptionUnwind( ICorDebugAppDomain appDomain, ICorDebugThread thread, CorDebugExceptionCallbackType eventType, int flags) { this.DefaultHandler(appDomain); }
public void OnException(AppDomain appDomainRef, Thread threadRef, Frame frameRef, int nOffset, CorDebugExceptionCallbackType dwEventType, int dwFlags) { _handleEvent(ManagedCallbackType.OnException2, new Exception2EventArgs(appDomainRef, threadRef, frameRef, nOffset, dwEventType, dwFlags, ManagedCallbackType.OnException2)); }
public void Exception(IntPtr pAppDomain, IntPtr pThread, IntPtr pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { Call(delegate { _managedCallback.Exception( _connector.MarshalAs<ICorDebugAppDomain>(pAppDomain), _connector.MarshalAs<ICorDebugThread>(pThread), _connector.MarshalAs<ICorDebugFrame>(pFrame), nOffset, dwEventType, dwFlags); }); }
public DebuggeeExceptionEventArgs(RuntimeAppDomain domain, RuntimeThread thread, uint offset, CorDebugExceptionCallbackType exceptionType) : base(domain, thread, PauseReason.Exception) { Offset = offset; ExceptionType = exceptionType; }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType exceptionType, uint dwFlags) { ManagedCallback managedCallback = GetProcessCallbackInterface(pAppDomain); if (managedCallback != null) { managedCallback.Exception2(pAppDomain, pThread, pFrame, nOffset, exceptionType, dwFlags); } }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType _exceptionType, uint dwFlags) { EnterCallback(PausedReason.Exception, "Exception2 (type=" + _exceptionType.ToString() + ")", pThread); // This callback is also called from Exception(...)!!!! (the .NET 1.1 version) // Watch out for the zeros and null! // Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0); ExceptionType exceptionType = (ExceptionType)_exceptionType; bool pauseOnHandled = !process.Evaluating && process.Options != null && process.Options.PauseOnHandledExceptions; if (exceptionType == ExceptionType.Unhandled || (pauseOnHandled && exceptionType == ExceptionType.CatchHandlerFound)) { // sanity check: we can only handle one exception after another // TODO : create Exception queue if CLR throws multiple exceptions Debug.Assert(process.SelectedThread.CurrentException == null); process.SelectedThread.CurrentException = new Exception(new Value(process.AppDomains[pAppDomain], process.SelectedThread.CorThread.GetCurrentException()).GetPermanentReference()); process.SelectedThread.CurrentException_DebuggeeState = process.DebuggeeState; process.SelectedThread.CurrentExceptionType = exceptionType; process.SelectedThread.CurrentExceptionIsUnhandled = exceptionType == ExceptionType.Unhandled; pauseOnNextExit = true; } ExitCallback(); }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType exceptionType, uint dwFlags) { EnterCallback(PausedReason.Exception, "Exception2 (type=" + exceptionType.ToString() + ")", pThread); // This callback is also called from Exception(...)!!!! (the .NET 1.1 version) // Whatch out for the zeros and null! // Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0); process.SelectedThread.CurrentExceptionType = (ExceptionType)exceptionType; if (ExceptionType.DEBUG_EXCEPTION_UNHANDLED != (ExceptionType)exceptionType) { // Handled exception if (process.PauseOnHandledException) { ExitCallback_Paused(); } else { ExitCallback_Continue(); } } else { // Unhandled exception ExitCallback_Paused(); } }
public Exception2DebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, CorDebugExceptionFlags dwFlags) : base(pAppDomain) { this.AppDomain = pAppDomain; this.Thread = pThread; this.Frame = pFrame; this.Offset = nOffset; this.EventType = dwEventType; this.Flags = dwFlags; }
public void Exception( ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { m_listner.PostExceptionNotification( new CorThread(pThread), new CorFunctionFrame(pFrame), dwEventType, dwFlags); controller.Continue(0); }
public void Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { throw new NotImplementedException(); }
int ICorDebugManagedCallback.Exception (CorDebugAppDomain pAppDomain, CorDebugThread pThread, CorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { return 0; }
public UnhandledExceptionThrownStopReason(CorAppDomain appDomain, CorThread thread, CorFrame frame, int offset, CorDebugExceptionCallbackType eventType, int flags) : base(appDomain, thread, frame, offset, eventType, flags) { }
public ExceptionThrownStopReason(CorAppDomain appDomain, CorThread thread, CorFrame frame, int offset, CorDebugExceptionCallbackType eventType, int flags, bool exceptionEnhancedOn) { m_appDomain = appDomain; m_thread = thread; m_frame = frame; m_offset = offset; m_eventtype = eventType; m_flags = flags; m_exceptionEnhancedOn = exceptionEnhancedOn; }
public void Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { var domain = GetProcessWrapper(pAppDomain).GetAppDomain(pAppDomain); var thread = domain.GetThread(pThread); var frame = thread.CurrentFrame; string exceptionType = string.Empty; switch (dwEventType) { case CorDebugExceptionCallbackType.CatchHandlerFound: exceptionType = "Catch handler"; break; case CorDebugExceptionCallbackType.FirstChance: exceptionType = "First chance"; break; case CorDebugExceptionCallbackType.Unhandled: exceptionType = "Unhandled"; break; case CorDebugExceptionCallbackType.UserFirstChance: exceptionType = "User first chance"; break; } Log("{0} exception occured in {1}, thread {2}, at offset {3}", exceptionType, domain.Name, thread.Id, nOffset); var eventArgs = new DebuggeeExceptionEventArgs(domain, thread, nOffset, dwEventType); domain.DispatchExceptionOccurredEvent(eventArgs); FinalizeEvent(eventArgs); }
public void Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { Console.WriteLine("Exception"); pAppDomain.Continue(0); }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType _exceptionType, uint dwFlags) { EnterCallback("Exception2 (type=" + _exceptionType.ToString() + ")", pThread); // This callback is also called from Exception(...)!!!! (the .NET 1.1 version) // Watch out for the zeros and null! // Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0); ExceptionType exceptionType = (ExceptionType)_exceptionType; bool pauseOnHandled = !process.Evaluating && process.Options != null && process.Options.PauseOnHandledExceptions; Thread thread = process.GetThread(pThread); if (exceptionType == ExceptionType.Unhandled || (pauseOnHandled && exceptionType == ExceptionType.CatchHandlerFound && BreakOnException(thread))) { // Multiple exceptions can happen at the same time on multiple threads // (I have managed to create a test application to trigger it) thread.CurrentExceptionType = exceptionType; RequestPause(thread).ExceptionsThrown.Add(thread); } ExitCallback(); }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType exceptionType, uint dwFlags) { EnterCallback(PausedReason.Exception, "Exception2 (type=" + exceptionType.ToString() + ")", pThread); // This callback is also called from Exception(...)!!!! (the .NET 1.1 version) // Watch out for the zeros and null! // Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0); if ((ExceptionType)exceptionType == ExceptionType.Unhandled || process.PauseOnHandledException) { process.SelectedThread.CurrentException = new Exception(new Value(process.AppDomains[pAppDomain], process.SelectedThread.CorThread.GetCurrentException()).GetPermanentReference()); process.SelectedThread.CurrentException_DebuggeeState = process.DebuggeeState; process.SelectedThread.CurrentExceptionType = (ExceptionType)exceptionType; process.SelectedThread.CurrentExceptionIsUnhandled = (ExceptionType)exceptionType == ExceptionType.Unhandled; pauseOnNextExit = true; } ExitCallback(); }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType _exceptionType, uint dwFlags) { EnterCallback(PausedReason.Exception, "Exception2 (type=" + _exceptionType.ToString() + ")", pThread); // This callback is also called from Exception(...)!!!! (the .NET 1.1 version) // Watch out for the zeros and null! // Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0); ExceptionType exceptionType = (ExceptionType)_exceptionType; bool pauseOnHandled = !process.Evaluating && process.Options != null && process.Options.PauseOnHandledExceptions; if (exceptionType == ExceptionType.Unhandled || (pauseOnHandled && exceptionType == ExceptionType.CatchHandlerFound)) { // sanity check: we can only handle one exception after another // TODO : create Exception queue if CLR throws multiple exceptions Debug.Assert(process.SelectedThread.CurrentException == null); process.SelectedThread.CurrentException = new Exception(new Value(process.AppDomains[pAppDomain], process.SelectedThread.CorThread.GetCurrentException()).GetPermanentReference()); process.SelectedThread.CurrentException_DebuggeeState = process.DebuggeeState; process.SelectedThread.CurrentExceptionType = exceptionType; process.SelectedThread.CurrentExceptionIsUnhandled = exceptionType == ExceptionType.Unhandled; pauseOnNextExit = true; } ExitCallback(); }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType exceptionType, uint dwFlags) { ManagedCallback managedCallback = GetProcessCallbackInterface("Exception2", pAppDomain); if (managedCallback != null) { managedCallback.Exception2(pAppDomain, pThread, pFrame, nOffset, exceptionType, dwFlags); } }
public void Exception(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { this.WrappedObject.Exception(pAppDomain, pThread, pFrame, nOffset, dwEventType, dwFlags); }
public Exception2DebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, CorDebugExceptionFlags dwFlags) : base(pAppDomain) { this.AppDomain = pAppDomain; this.Thread = pThread; this.Frame = pFrame; this.Offset = nOffset; this.EventType = dwEventType; this.Flags = dwFlags; }
void ICorDebugManagedCallback2.Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
public void Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { pAppDomain.Continue(0); }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType _exceptionType, uint dwFlags) { EnterCallback("Exception2 (type=" + _exceptionType.ToString() + ")", pThread); // This callback is also called from Exception(...)!!!! (the .NET 1.1 version) // Watch out for the zeros and null! // Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0); ExceptionType exceptionType = (ExceptionType)_exceptionType; bool pauseOnHandled = !process.Evaluating && process.Options != null && process.Options.PauseOnHandledExceptions; Thread thread = process.GetThread(pThread); if (exceptionType == ExceptionType.Unhandled || (pauseOnHandled && exceptionType == ExceptionType.CatchHandlerFound && BreakOnException(thread))) { // Multiple exceptions can happen at the same time on multiple threads // (I have managed to create a test application to trigger it) thread.CurrentExceptionType = exceptionType; RequestPause(thread).ExceptionsThrown.Add(thread); } ExitCallback(); }
public void ExceptionCatcher(ICorDebugAppDomain appDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { ExceptionCatcherNotification(new CorDebugAppDomain(appDomain), new CorThread(pThread), new CorFunctionFrame(pFrame), dwEventType,nOffset); }
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 virtual void Exception( ICorDebugAppDomain appDomain, ICorDebugThread thread, ICorDebugFrame frame, int offset, CorDebugExceptionCallbackType eventType, int flags) { this.DefaultHandler(appDomain); }
public void Exception(IntPtr pAppDomain, IntPtr pThread, IntPtr pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { Call(delegate { _managedCallback.Exception( _connector.MarshalAs <ICorDebugAppDomain>(pAppDomain), _connector.MarshalAs <ICorDebugThread>(pThread), _connector.MarshalAs <ICorDebugFrame>(pFrame), nOffset, dwEventType, dwFlags); }); }
public void Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { try { _EnterCallback(); _CallbackNotImplemented(); _CallbackEvent("Exception"); } catch (Exception e) { _CallbackException(e); } }
public void Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { var domain = GetProcessWrapper(pAppDomain).GetAppDomain(pAppDomain); var thread = domain.GetThread(pThread); var frame = thread.CurrentFrame; string exceptionType = string.Empty; switch (dwEventType) { case CorDebugExceptionCallbackType.CatchHandlerFound: exceptionType = "Catch handler"; break; case CorDebugExceptionCallbackType.FirstChance: exceptionType = "First chance"; break; case CorDebugExceptionCallbackType.Unhandled: exceptionType = "Unhandled"; break; case CorDebugExceptionCallbackType.UserFirstChance: exceptionType = "User first chance"; break; } Log("{0} exception occured in {1}, thread {2}, at offset {3}", exceptionType, domain.Name, thread.Id, nOffset); var eventArgs = new DebuggeeExceptionEventArgs(domain, thread, nOffset, dwEventType); domain.DispatchExceptionOccurredEvent(eventArgs); FinalizeEvent(eventArgs); }
public UnhandledExceptionThrownStopReason(CorAppDomain appDomain, CorThread thread, CorFrame frame, int offset, CorDebugExceptionCallbackType eventType, int flags) : base(appDomain, thread, frame, offset, eventType, flags) { }
int ICorDebugManagedCallback.Exception(CorDebugAppDomain pAppDomain, CorDebugThread pThread, CorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { return(0); }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType exceptionType, uint dwFlags) { EnterCallback(PausedReason.Exception, "Exception2 (type=" + exceptionType.ToString() + ")", pThread); // This callback is also called from Exception(...)!!!! (the .NET 1.1 version) // Whatch out for the zeros and null! // Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0); process.SelectedThread.CurrentExceptionType = (ExceptionType)exceptionType; if (ExceptionType.DEBUG_EXCEPTION_UNHANDLED != (ExceptionType)exceptionType) { // Handled exception if (process.PauseOnHandledException) { ExitCallback_Paused(); } else { ExitCallback_Continue(); } } else { // Unhandled exception ExitCallback_Paused(); } }
private static void OnException(IntPtr thisPtr, IntPtr appDomainRef, IntPtr threadRef, IntPtr frameRef, int nOffset, CorDebugExceptionCallbackType dwEventType, int dwFlags) { var shadow = ToShadow <ManagedCallback2Shadow>(thisPtr); var callback = (ManagedCallbackImpl)shadow.Callback; callback.OnException(new AppDomain(appDomainRef), new Thread(threadRef), new Frame(frameRef), nOffset, dwEventType, dwFlags); }
public void Exception(IntPtr pAppDomain, IntPtr pThread, IntPtr pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { Call(delegate { callbackSwitch.Exception2( MTA2STA.MarshalIntPtrTo <ICorDebugAppDomain>(pAppDomain), MTA2STA.MarshalIntPtrTo <ICorDebugThread>(pThread), MTA2STA.MarshalIntPtrTo <ICorDebugFrame>(pFrame), nOffset, dwEventType, dwFlags ); }); }
public ManagedCallbackException (CorDebugThread thread, CorDebugFrame frame, uint ip, CorDebugExceptionCallbackType type) : base (thread) { m_type = type; m_frame = frame; m_ip = ip; if (!thread.Engine.Capabilities.ExceptionFilters) { m_fSuspendThreadEvents = (m_type == CorDebugExceptionCallbackType.DEBUG_EXCEPTION_FIRST_CHANCE) || (m_type == CorDebugExceptionCallbackType.DEBUG_EXCEPTION_USER_FIRST_CHANCE); } //Because we are now doing two-pass exception handling, the stack's IP isn't going to be the handler, so //we have to use the IP sent via the breakpointDef and not the stack frame. if (m_frame != null && m_frame.Function != null && m_frame.Function.HasSymbols) { m_ip = m_frame.Function.GetILCLRFromILTinyCLR (m_ip); } }
void ICorDebugManagedCallback2.Exception(IntPtr pAppDomain, IntPtr pThread, IntPtr pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, CorDebugExceptionFlags dwFlags) { dbg.OnManagedCallbackFromAnyThread(() => new Exception2DebugCallbackEventArgs(I <ICorDebugAppDomain>(pAppDomain), I <ICorDebugThread>(pThread), I <ICorDebugFrame>(pFrame), nOffset, dwEventType, dwFlags)); }
public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType exceptionType, uint dwFlags) { EnterCallback(PausedReason.Exception, "Exception2 (type=" + exceptionType.ToString() + ")", pThread); // This callback is also called from Exception(...)!!!! (the .NET 1.1 version) // Watch out for the zeros and null! // Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0); if ((ExceptionType)exceptionType == ExceptionType.Unhandled || process.PauseOnHandledException) { process.SelectedThread.CurrentException = new Exception(new Value(process.AppDomains[pAppDomain], process.SelectedThread.CorThread.GetCurrentException()).GetPermanentReference()); process.SelectedThread.CurrentException_DebuggeeState = process.DebuggeeState; process.SelectedThread.CurrentExceptionType = (ExceptionType)exceptionType; process.SelectedThread.CurrentExceptionIsUnhandled = (ExceptionType)exceptionType == ExceptionType.Unhandled; pauseOnNextExit = true; } ExitCallback(); }
void ICorDebugManagedCallback2.Exception(ICorDebugAppDomain ad, ICorDebugThread thread, ICorDebugFrame frame, uint offset, CorDebugExceptionCallbackType eventType, uint flags) { HandleEvent(ManagedCallbackType.OnException2, new CorException2EventArgs(ad == null ? null : new CorAppDomain(ad), thread == null ? null : new CorThread(thread), frame == null ? null : new CorFrame(frame), (int)offset, eventType, (int)flags, ManagedCallbackType.OnException2)); }
public static void Exception(this ICorDebugManagedCallback2 instance, IntPtr pAppDomain, IntPtr pThread, IntPtr pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { instance.Exception(pAppDomain, pThread, pFrame, nOffset, dwEventType, dwFlags); }