Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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;
 }
Exemple #5
0
        public void OnEntryPoint(DebuggedThread thread)
        {
            AD7EntryPointEvent eventObject = new AD7EntryPointEvent();

            Send(eventObject, AD7EntryPointEvent.IID, (AD7Thread)thread.Client);
        }
Exemple #6
0
 public AD7Thread(AD7Engine engine, DebuggedThread debuggedThread)
 {
     m_engine = engine;
     m_debuggedThread = debuggedThread;
 }
Exemple #7
0
 public void OnStepComplete(DebuggedThread thread)
 {
     // Step complete is sent when a step has finished. The sample engine does not support stepping.
     throw new NotImplementedException();
 }
Exemple #8
0
 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();
 }
Exemple #9
0
 /// <summary>
 /// On First run
 /// </summary>
 /// <param name="thread"></param>
 internal void Continue(DebuggedThread thread)
 {
     //_vm.Resume();
 }
Exemple #10
0
 public void OnLoadComplete(DebuggedThread thread)
 {
     AD7Thread ad7Thread = (AD7Thread)thread.Client;
     AD7LoadCompleteEvent eventObject = new AD7LoadCompleteEvent();
     Send(eventObject, AD7LoadCompleteEvent.IID, ad7Thread);
 }
Exemple #11
0
 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.");
 }
Exemple #12
0
        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);
        }
Exemple #13
0
        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);
        }
Exemple #14
0
        // 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);
        }