This class manages breakpoints for the engine.
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="pBPRequest"> The breakpoint request used to create this pending breakpoint. </param>
        /// <param name="engine"> The AD7Engine object that represents the DE. </param>
        /// <param name="bpManager"> The breakpoint manager. </param>
        public AD7PendingBreakpoint(IDebugBreakpointRequest2 pBPRequest, AD7Engine engine, BreakpointManager bpManager)
        {
            m_pBPRequest = pBPRequest;
            BP_REQUEST_INFO[] requestInfo = new BP_REQUEST_INFO[1];
            m_pBPRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_BPLOCATION, requestInfo);
            m_bpRequestInfo = requestInfo[0];
            m_pBPRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_CONDITION, requestInfo);
            if (requestInfo[0].dwFields != 0)
            {
                m_bpRequestInfo.bpCondition = requestInfo[0].bpCondition;
                m_bpRequestInfo.dwFields |= requestInfo[0].dwFields;
            }
            m_pBPRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_PASSCOUNT, requestInfo);
            if (requestInfo[0].dwFields != 0)
            {
                m_bpRequestInfo.bpPassCount = requestInfo[0].bpPassCount;
                m_bpRequestInfo.dwFields |= requestInfo[0].dwFields;
            }

            m_engine = engine;
            m_bpManager = bpManager;
            m_boundBreakpoints = new System.Collections.Generic.List<AD7BoundBreakpoint>();

            m_enabled = true;
            m_deleted = false;
        }
示例#2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="pBPRequest"> The breakpoint request used to create this pending breakpoint. </param>
        /// <param name="engine"> The AD7Engine object that represents the DE. </param>
        /// <param name="bpManager"> The breakpoint manager. </param>
        public AD7PendingBreakpoint(IDebugBreakpointRequest2 pBPRequest, AD7Engine engine, BreakpointManager bpManager)
        {
            m_pBPRequest = pBPRequest;
            BP_REQUEST_INFO[] requestInfo = new BP_REQUEST_INFO[1];
            m_pBPRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_BPLOCATION, requestInfo);
            m_bpRequestInfo = requestInfo[0];
            m_pBPRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_CONDITION, requestInfo);
            if (requestInfo[0].dwFields != 0)
            {
                m_bpRequestInfo.bpCondition = requestInfo[0].bpCondition;
                m_bpRequestInfo.dwFields   |= requestInfo[0].dwFields;
            }
            m_pBPRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_PASSCOUNT, requestInfo);
            if (requestInfo[0].dwFields != 0)
            {
                m_bpRequestInfo.bpPassCount = requestInfo[0].bpPassCount;
                m_bpRequestInfo.dwFields   |= requestInfo[0].dwFields;
            }

            m_engine           = engine;
            m_bpManager        = bpManager;
            m_boundBreakpoints = new System.Collections.Generic.List <AD7BoundBreakpoint>();

            m_enabled = true;
            m_deleted = false;
        }
示例#3
0
        /// <summary>
        /// Called by the SDM to indicate that a synchronous debug event, previously sent by the DE to the SDM,
        /// was received and processed. The only event the VSNDK Debug Engine sends in this fashion is Program Destroy.
        /// It responds to that event by shutting down the engine. (http://msdn.microsoft.com/en-us/library/bb160915.aspx)
        /// </summary>
        /// <param name="eventObject"> Represents the previously sent synchronous event from which the debugger should now continue. </param>
        /// <returns> If successful, returns S_OK; otherwise, returns an error code. </returns>
        int IDebugEngine2.ContinueFromSynchronousEvent(IDebugEvent2 eventObject)
        {
            try
            {
                if (eventObject is AD7ProgramDestroyEvent)
                {
                    resetStackFrames();
                    m_process.Detach();
                    m_process = null;

                    m_program.Detach();
                    m_program = null;

                    m_engineCallback = null;
                    m_breakpointManager = null;
                    m_docContext = null;
                    m_eventDispatcher = null;
                    m_module = null;
                    m_progNode = null;
                    m_programGUID = Guid.Empty;

                    m_threads = null;
                    GC.Collect();
                }
                else
                {
                    Debug.Fail("Unknown synchronous event");
                }
            }
            catch (Exception e)
            {
                return EngineUtils.UnexpectedException(e);
            }

            if (m_eventDispatcher != null)
                m_eventDispatcher.continueExecution();

            return VSConstants.S_OK;
        }
示例#4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public AD7Engine()
 {
     m_breakpointManager = new BreakpointManager(this);
     m_state = DE_STATE.DESIGN_MODE;
 }
示例#5
0
 public AD7Engine()
 {
     m_breakpointManager = new BreakpointManager(this);
     m_state = DE_STATE.DESIGN_MODE;
     //GDBParser.Initialize();
 }