示例#1
0
 void FinishEvent(CorEventArgs ev)
 {
     if (ev.Continue)
     {
         ev.Controller.Continue(false);
     }
 }
示例#2
0
            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);
            }
示例#3
0
            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);
            }
示例#4
0
            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);
            }
示例#5
0
            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);
            }
示例#6
0
            void ICorDebugManagedCallback.LoadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
            {
                var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "LoadClass");

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#7
0
            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);
            }
示例#8
0
            void ICorDebugManagedCallback.UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
            {
                var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "UnloadAssembly");

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#9
0
            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);
            }
示例#10
0
            void ICorDebugManagedCallback.ControlCTrap(ICorDebugProcess pProcess)
            {
                var ev = new CorEventArgs(CorProcess.GetOrCreateCorProcess(pProcess, p_options));

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#11
0
            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);
            }
示例#12
0
            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);
            }
示例#13
0
            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);
            }
示例#14
0
            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);
            }
示例#15
0
            void ICorDebugManagedCallback.LoadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
            {
                var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options));

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#16
0
            void ICorDebugManagedCallback.ExitThread(ICorDebugAppDomain pAppDomain, ICorDebugThread thread)
            {
                var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "ExitThread");

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#17
0
            void ICorDebugManagedCallback.EvalComplete(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugEval pEval)
            {
                var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "EvalComplete");

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#18
0
            void ICorDebugManagedCallback.NameChange(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread)
            {
                var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options));

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#19
0
            void ICorDebugManagedCallback.UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
            {
                var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options));

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#20
0
            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);
            }
示例#21
0
            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);
            }
示例#22
0
            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);
            }
示例#23
0
            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);
            }
示例#24
0
            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?!");
                }
            }
示例#25
0
            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);
            }
示例#26
0
 internal void DispatchEvent(CorEventArgs ev)
 {
     Console.WriteLine($"Debugger Event: {ev.EventInfo}");
     // by default do nothing
     ev.Continue = true;
 }
示例#27
0
 internal void DispatchEvent(CorEventArgs ev)
 {
     // by default do nothing
     ev.Continue = true;
 }