コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
ファイル: Thread.cs プロジェクト: valentinbreiz/Sharpen
 /// <summary>
 /// Creates a new thread
 /// </summary>
 public Thread()
 {
     TID     = NextTID++;
     Context = new X86ThreadContext();
     m_currentSignalContext = null;
     m_signalMutex          = new Mutex();
 }
コード例 #3
0
ファイル: AD7StackFrame.cs プロジェクト: jda808/NPL
        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);
                }
            }
        }
コード例 #4
0
        X86ThreadContext GetThreadContext()
        {
            X86ThreadContext threadContext = m_engine.DebuggedProcess.GetThreadContext(m_debuggedThread.Handle);

            return(threadContext);
        }