コード例 #1
0
 //
 // IEnumerator interface
 //
 public bool MoveNext()
 {
     ICorDebugChain[] a = new ICorDebugChain[1];
     uint c = 0;
     int r = m_enum.Next ((uint)a.Length, a, out c);
     if (r==0 && c==1) // S_OK && we got 1 new element
         m_chain = new CorChain (a[0]);
     else
         m_chain = null;
     return m_chain != null;
 }
コード例 #2
0
        //
        // IEnumerator interface
        //
        public bool MoveNext()
        {
            ICorDebugChain[] a = new ICorDebugChain[1];
            uint             c = 0;
            int r = m_enum.Next((uint)a.Length, a, out c);

            if (r == 0 && c == 1) // S_OK && we got 1 new element
            {
                m_chain = new CorChain(a[0]);
            }
            else
            {
                m_chain = null;
            }
            return(m_chain != null);
        }
コード例 #3
0
 public void Reset()
 {
     m_enum.Reset ();
     m_chain = null;
 }
コード例 #4
0
ファイル: FrameFactory.cs プロジェクト: Orvid/Cosmos
        /// <summary>
        /// Unwind unmanaged frames within an native chain.
        /// </summary>
        /// <param name="thread">thread containing chain</param>
        /// <param name="nativeChain">a native CorChain</param>
        /// <returns>enumeration of MDbgFrames for the native frames</returns>
        /// <remarks>ICorDebug stackwalking only unwinds managed chains. 
        /// A derived class can override this function to provide native stacktracing.</remarks>
        protected virtual IEnumerable<MDbgFrame> UnwindNativeFrames(MDbgThread thread, CorChain nativeChain)
        {
            Debug.Assert(!nativeChain.IsManaged);

            // Base class can't unwind unmanaged chains. 
            // A derived class can override and provide native stack unwinding.
            // Use:
            // 1) chain.RegisterSet to get the starting context.
            // 2) chain.GetStackRange(out start, out end);   to get the stackrange to unwind to
            // 3) a native unwinder (such as DbgHelp.dll) to actually do the native stack unwinding.
            yield break;
        }
コード例 #5
0
ファイル: FrameFactory.cs プロジェクト: uQr/Visual-NHibernate
        /// <summary>
        /// The function should parse the native part of the stack and fill the m_frameCache with the 
        /// corresponding frames from the native chain. Further it should return the top-most frame in the chain.
        /// </summary>
        /// <param name="chain">the native chain on the stack</param>
        /// <returns>First frame from the native chain or null if there are no frames</returns>
        protected virtual MDbgFrame FillAndGetLeafFrameFromNativeChain(CorChain chain)
        {
            Debug.Assert(chain != null);
            Debug.Assert(!chain.IsManaged);

            // StackWalkers that support interop callstacks would want to fill the list of frames and return
            // topmost native frame from that chain.
            return null;
        }
コード例 #6
0
 public void Reset()
 {
     m_enum.Reset();
     m_chain = null;
 }