The debug engine (DE) sends this interface to the session debug manager (SDM) when a program stops at a breakpoint. (http://msdn.microsoft.com/en-us/library/bb145927.aspx)
Inheritance: AD7StoppingEvent, IDebugBreakpointEvent2
コード例 #1
0
        /// <summary>
        /// Send an event to SDM with the breakpoint that was hit.
        /// </summary>
        /// <param name="thread"> The thread running in a program. </param>
        /// <param name="clients"> List of bound breakpoints. At this moment, this list has only one element. </param>
        public void OnBreakpoint(AD7Thread thread, IList <IDebugBoundBreakpoint2> clients)
        {
            IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count];

            int i = 0;

            foreach (object objCurrentBreakpoint in clients)
            {
                boundBreakpoints[i] = (IDebugBoundBreakpoint2)objCurrentBreakpoint;
                i++;
            }

            AD7BoundBreakpointsEnum boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
            AD7BreakpointEvent      eventObject          = new AD7BreakpointEvent(boundBreakpointsEnum);

            Send(eventObject, AD7BreakpointEvent.IID, thread);
        }
コード例 #2
0
ファイル: EngineCallback.cs プロジェクト: blackberry/VSPlugin
        /// <summary>
        /// Send an event to SDM with the breakpoint that was hit.
        /// </summary>
        /// <param name="thread"> The thread running in a program. </param>
        /// <param name="clients"> List of bound breakpoints. At this moment, this list has only one element. </param>
        public void OnBreakpoint(AD7Thread thread, IList<IDebugBoundBreakpoint2> clients)
        {
            IDebugBoundBreakpoint2[] boundBreakpoints = new IDebugBoundBreakpoint2[clients.Count];

            int i = 0;
            foreach (object objCurrentBreakpoint in clients)
            {
                boundBreakpoints[i] = (IDebugBoundBreakpoint2)objCurrentBreakpoint;
                i++;
            }

            AD7BoundBreakpointsEnum boundBreakpointsEnum = new AD7BoundBreakpointsEnum(boundBreakpoints);
            AD7BreakpointEvent eventObject = new AD7BreakpointEvent(boundBreakpointsEnum);

            Send(eventObject, AD7BreakpointEvent.IID, thread);
        }
コード例 #3
0
ファイル: EngineCallback.cs プロジェクト: hkopparru/VSPlugin
        /*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(GDBParser.CurrentThreadId == m_engine.DebuggedProcess.PollThreadId);
            //}

            // AD7Thread ad7Thread = new AD7Thread(m_engine, debuggedThread);
            // debuggedThread.Client = ad7Thread;

            AD7ThreadCreateEvent eventObject = new AD7ThreadCreateEvent();
            // Send(eventObject, AD7ThreadCreateEvent.IID, ad7Thread);
            Send(eventObject, AD7ThreadCreateEvent.IID, debuggedThread);
        }*/
        public void OnBreakpoint(AD7Thread thread, IList<IDebugBoundBreakpoint2> 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);

            Send(eventObject, AD7BreakpointEvent.IID, thread);
        }