// 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); }
// 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; }
public AD7StackFrame(AD7Engine engine, AD7Thread thread) { m_engine = engine; m_thread = thread; m_line = m_thread.Line; // TODO populate m_numLocals = thread.NumberOfLocals; // Now populate locals m_locals = new Variable[m_numLocals]; // TODO: Get Locals here from thread }