public void OnAsyncBreakComplete(DebuggedThread thread) { // This will get called when the engine receives the breakpoint event that is created when the user // hits the pause button in vs. Debug.Assert(Worker.CurrentThreadId == m_engine.DebuggedProcess.PollThreadId); AD7Thread ad7Thread = (AD7Thread)thread.Client; AD7AsyncBreakCompleteEvent eventObject = new AD7AsyncBreakCompleteEvent(); Send(eventObject, AD7AsyncBreakCompleteEvent.IID, ad7Thread); }
public void OnBreakpoint(DebuggedThread thread, ReadOnlyCollection<object> clients, uint address) { IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count]; int i = 0; foreach (object objCurrentBreakpoint in clients) { boundBreakpoints[i] = (IDebugBoundBreakpoint2)objCurrentBreakpoint; i++; } // An engine that supports more advanced breakpoint features such as hit counts, conditions and filters // should notify each bound breakpoint that it has been hit and evaluate conditions here. // The sample engine does not support these features. AD7BoundBreakpointsEnum boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints); AD7BreakpointEvent eventObject = new AD7BreakpointEvent(boundBreakpointsEnum); AD7Thread ad7Thread = (AD7Thread)thread.Client; Send(eventObject, AD7BreakpointEvent.IID, ad7Thread); }
public void OnBreakpoint(DebuggedThread thread, ReadOnlyCollection <object> clients) { IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count]; int i = 0; foreach (object objCurrentBreakpoint in clients) { boundBreakpoints[i] = (IDebugBoundBreakpoint2)objCurrentBreakpoint; i++; } // An engine that supports more advanced breakpoint features such as hit counts, conditions and filters // should notify each bound breakpoint that it has been hit and evaluate conditions here. // The sample engine does not support these features. AD7BoundBreakpointsEnum boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints); AD7BreakpointEvent eventObject = new AD7BreakpointEvent(boundBreakpointsEnum); AD7Thread ad7Thread = (AD7Thread)thread.Client; Send(eventObject, AD7BreakpointEvent.IID, ad7Thread); }
public AD7Thread(AD7Engine engine, DebuggedThread debuggedThread) { _engine = engine; _debuggedThread = debuggedThread; }
public void OnEntryPoint(DebuggedThread thread) { AD7EntryPointEvent eventObject = new AD7EntryPointEvent(); Send(eventObject, AD7EntryPointEvent.IID, (AD7Thread)thread.Client); }
public AD7Thread(AD7Engine engine, DebuggedThread debuggedThread) { m_engine = engine; m_debuggedThread = debuggedThread; }
public void OnStepComplete(DebuggedThread thread) { // Step complete is sent when a step has finished. The sample engine does not support stepping. throw new NotImplementedException(); }
public void OnException(DebuggedThread thread, uint code) { // Exception events are sent when an exception occurs in the debuggee that the debugger was not expecting. // The sample engine does not support these. throw new NotImplementedException(); }
/// <summary> /// On First run /// </summary> /// <param name="thread"></param> internal void Continue(DebuggedThread thread) { //_vm.Resume(); }
public void OnLoadComplete(DebuggedThread thread) { AD7Thread ad7Thread = (AD7Thread)thread.Client; AD7LoadCompleteEvent eventObject = new AD7LoadCompleteEvent(); Send(eventObject, AD7LoadCompleteEvent.IID, ad7Thread); }
public void OnException(DebuggedThread thread, uint code) { // Exception events are sent when an exception occurs in the debuggee that the debugger was not expecting. // The sample engine does not support these. throw new Exception("The method or operation is not implemented."); }
public void OnThreadStart(DebuggedThread debuggedThread) { // This will get called when the entrypoint breakpoint is fired because the engine sends a thread start event // for the main thread of the application. if (m_engine.DebuggedProcess != null) { Debug.Assert(Worker.CurrentThreadId == m_engine.DebuggedProcess.PollThreadId); } AD7Thread ad7Thread = new AD7Thread(m_engine, debuggedThread); debuggedThread.Client = ad7Thread; AD7ThreadCreateEvent eventObject = new AD7ThreadCreateEvent(); Send(eventObject, AD7ThreadCreateEvent.IID, ad7Thread); }
public void OnThreadExit(DebuggedThread debuggedThread, uint exitCode) { Debug.Assert(Worker.CurrentThreadId == m_engine.DebuggedProcess.PollThreadId); AD7Thread ad7Thread = (AD7Thread)debuggedThread.Client; Debug.Assert(ad7Thread != null); AD7ThreadDestroyEvent eventObject = new AD7ThreadDestroyEvent(exitCode); Send(eventObject, AD7ThreadDestroyEvent.IID, ad7Thread); }
// Only for NPL stepping public void OnStepComplete(DebuggedThread debuggedThread) { Debug.Assert(Worker.CurrentThreadId == m_engine.DebuggedProcess.PollThreadId); AD7Thread ad7Thread = (AD7Thread)debuggedThread.Client; Debug.Assert(ad7Thread != null); AD7StepCompleteEvent eventObject = new AD7StepCompleteEvent(); Send(eventObject, AD7StepCompleteEvent.IID, ad7Thread); }