Exemplo n.º 1
0
        // Attach the debug engine to a program.
        int IDebugEngine2.Attach(IDebugProgram2[] rgpPrograms, IDebugProgramNode2[] rgpProgramNodes, uint celtPrograms, IDebugEventCallback2 ad7Callback, enum_ATTACH_REASON dwReason)
        {
            int processId = EngineUtils.GetProcessId(rgpPrograms[0]);

            if (processId == 0)
            {
                return(VSConstants.E_NOTIMPL);
            }

            pID = (uint)processId;

            events = ad7Callback;

            EngineUtils.RequireOk(rgpPrograms[0].GetProgramId(out m_ad7ProgramId));

            AD7EngineCreateEvent.Send(this);

            AD7ProgramCreateEvent.Send(this);

            debugThread = new AD7Thread(this);

            AD7ThreadCreateEvent.Send(this);

            // This event is optional
            AD7LoadCompleteEvent.Send(this);


            return(VSConstants.S_OK);
        }
Exemplo n.º 2
0
        // 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 sample engine sends in this fashion is Program Destroy.
        // It responds to that event by shutting down the engine.
        int IDebugEngine2.ContinueFromSynchronousEvent(IDebugEvent2 eventObject)
        {
            AD7ProgramCreateEvent programCreate = eventObject as AD7ProgramCreateEvent;

            if (programCreate != null)
            {
                _programCreateContinued.Set();
            }

            return(VSConstants.S_OK);
        }
Exemplo n.º 3
0
 internal static void Send(AD7Engine engine)
 {
     AD7ProgramCreateEvent eventObject = new AD7ProgramCreateEvent();
     engine.Send(eventObject, IID, null);
 }
Exemplo n.º 4
0
        internal static void Send(AD7Engine engine)
        {
            AD7ProgramCreateEvent eventObject = new AD7ProgramCreateEvent();

            engine.Send(eventObject, IID, null);
        }