public AD7StackFrame(AD7Engine engine, AD7Thread thread, X86ThreadContext threadContext) { m_engine = engine; m_thread = thread; m_threadContext = threadContext; // Try to get source information for this location. If symbols for this file have not been found, this will fail. m_hasSource = m_engine.DebuggedProcess.GetSourceInformation( m_threadContext.eip, ref m_documentName, ref m_functionName, ref m_lineNum, ref m_numParameters, ref m_numLocals); // If source information is available, create the collections of locals and parameters and populate them with // values from the debuggee. if (m_hasSource) { if (m_numParameters > 0) { m_parameters = new VariableInformation[m_numParameters]; m_engine.DebuggedProcess.GetFunctionArgumentsByIP(m_threadContext.eip, m_threadContext.ebp, m_parameters); } if (m_numLocals > 0) { m_locals = new VariableInformation[m_numLocals]; m_engine.DebuggedProcess.GetFunctionLocalsByIP(m_threadContext.eip, m_threadContext.ebp, m_locals); } } }
/// <summary> /// Creates a new thread /// </summary> public Thread() { TID = NextTID++; Context = new X86ThreadContext(); m_currentSignalContext = null; m_signalMutex = new Mutex(); }
X86ThreadContext GetThreadContext() { X86ThreadContext threadContext = m_engine.DebuggedProcess.GetThreadContext(m_debuggedThread.Handle); return(threadContext); }