Exemplo n.º 1
0
            void ICorDebugManagedCallback.Breakpoint(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, ICorDebugBreakpoint pBreakpoint)
            {
                var ev = new CorBreakpointEventArgs(new CorAppDomain(pAppDomain, p_options),
                                                    new CorThread(pThread, p_options),
                                                    new CorFunctionBreakpoint((ICorDebugFunctionBreakpoint)pBreakpoint, p_options));

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

                FinishEvent(ev);
            }
Exemplo n.º 2
0
        static void process_OnBreakpoint(Cursive.Debugging.CorDebug.CorBreakpointEventArgs ev)
        {
            Console.WriteLine("Breakpoint hit.");

            var source = ev.Thread.GetCurrentSourcePosition();

            DisplayCurrentSourceCode(source);

            ProcessCommand((ev.Controller is CorProcess) ? (CorProcess)ev.Controller : ((CorAppDomain)ev.Controller).GetProcess());
        }
Exemplo n.º 3
0
        internal void DispatchEvent(CorBreakpointEventArgs ev)
        {
            // stops executing by default (further handlers may change this)
            ev.Continue = false;

            // calls external handlers
            if (OnBreakpoint != null)
            {
                OnBreakpoint(ev);
            }
        }