void FinishEvent(CorEventArgs ev) { if (ev.Continue) { ev.Controller.Continue(false); } }
void ICorDebugManagedCallback2.ExceptionUnwind(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, CorDebugExceptionUnwindCallbackType dwEventType, uint dwFlags) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.BreakpointSetError(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint, uint dwError) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.UpdateModuleSymbols(ICorDebugAppDomain pAppDomain, ICorDebugModule pModule, System.Runtime.InteropServices.ComTypes.IStream pSymbolStream) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.LogMessage(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, int lLevel, string pLogSwitchName, string pMessage) { var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), $"LogMessage: {pLogSwitchName} - {pMessage}"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.LoadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c) { var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "LoadClass"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback2.FunctionRemapOpportunity(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFunction pOldFunction, ICorDebugFunction pNewFunction, uint oldILOffset) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly) { var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "UnloadAssembly"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback2.Exception(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFrame pFrame, uint nOffset, CorDebugExceptionCallbackType dwEventType, uint dwFlags) { var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), $"Exception (2) - {dwEventType}"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.ControlCTrap(ICorDebugProcess pProcess) { var ev = new CorEventArgs(CorProcess.GetOrCreateCorProcess(pProcess, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
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); }
void ICorDebugManagedCallback.DebuggerError(ICorDebugProcess pProcess, int errorHR, uint errorCode) { var ev = new CorEventArgs(CorProcess.GetOrCreateCorProcess(pProcess, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.LogSwitch(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, int lLevel, uint ulReason, string pLogSwitchName, string pParentName) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.EvalException(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugEval pEval) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.LoadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.ExitThread(ICorDebugAppDomain pAppDomain, ICorDebugThread thread) { var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "ExitThread"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.EvalComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugEval pEval) { var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "EvalComplete"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.NameChange(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly) { var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.EditAndContinueRemap(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugFunction pFunction, int fAccurate) { // TODO HandleEvent(ManagedCallbackType.On new CorEventArgs(new CorAppDomain(pAppDomain))); var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "EditAndContinueRemap"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.ExitProcess(ICorDebugProcess pProcess) { var ev = new CorEventArgs(CorProcess.GetOrCreateCorProcess(pProcess, p_options), "ExitProcess"); GetOwner(ev.Controller).DispatchEvent(ev); ev.Continue = false; FinishEvent(ev); }
void ICorDebugManagedCallback.CreateAppDomain(ICorDebugProcess pProcess, ICorDebugAppDomain pAppDomain) { // attach to the appdomain pAppDomain.Attach(); var ev = new CorEventArgs(CorProcess.GetOrCreateCorProcess(pProcess, p_options)); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
void ICorDebugManagedCallback.UnloadModule(ICorDebugAppDomain pAppDomain, ICorDebugModule pModule) { var appDomain = GetCachedAppDomain(pAppDomain); var ev = new CorEventArgs(appDomain, "UnloadModule"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); appDomain.UnloadModule(pModule); }
void ICorDebugManagedCallback.ExitAppDomain(ICorDebugProcess pProcess, ICorDebugAppDomain pAppDomain) { var ev = new CorEventArgs(CorProcess.GetOrCreateCorProcess(pProcess, p_options), "ExitAppDomain"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); if (appDomainCache.TryRemove(pAppDomain, out _) == false) { Console.WriteLine("Unable to remove AppDomain from cache during ExitAppDomain callback?!"); } }
void ICorDebugManagedCallback.CreateAppDomain(ICorDebugProcess pProcess, ICorDebugAppDomain pAppDomain) { // attach to the appdomain pAppDomain.Attach(); if (appDomainCache.TryAdd(pAppDomain, new CorAppDomain(pAppDomain, p_options)) == false) { Console.WriteLine("Unable to add AppDomain to cache during CreateAppDomain callback?!"); } var ev = new CorEventArgs(CorProcess.GetOrCreateCorProcess(pProcess, p_options), "CreateAppDomain"); GetOwner(ev.Controller).DispatchEvent(ev); FinishEvent(ev); }
internal void DispatchEvent(CorEventArgs ev) { Console.WriteLine($"Debugger Event: {ev.EventInfo}"); // by default do nothing ev.Continue = true; }
internal void DispatchEvent(CorEventArgs ev) { // by default do nothing ev.Continue = true; }