internal MDbgFunction(MDbgModule managedModule, CorDebug.CorFunction managedFunction)
        {
            Debug.Assert(managedModule != null);
            Debug.Assert(managedFunction != null);
            Debug.Assert(managedFunction.Version >= 0 && managedFunction.Version - 1 <= managedModule.EditsCounter);
            // version numbers starts with 1

            m_module   = managedModule;
            m_function = managedFunction;
            EnsureIsUpToDate();
        }
        /// <summary>
        /// Releases all resources used by the MDbgFunction.
        /// </summary>
        public void Dispose()
        {
            // Release unmanaged resources, especially symbol readers
            m_function = null;

            m_symMethod      = null;
            m_SPoffsets      = null;
            m_SPdocuments    = null;
            m_SPstartLines   = null;
            m_SPendLines     = null;
            m_SPstartColumns = null;
            m_SPendColumns   = null;
            m_SPcount        = 0;
        }
        public MDbgFunction Get(CorDebug.CorFunction managedFunction)
        {
            int funcVersion;

            funcVersion = managedFunction.Version;

            // now get version from our cache.
            MDbgFunction mdbgFunction = RetrieveFromCache(managedFunction.Token, funcVersion);

            if (mdbgFunction == null)
            {
                mdbgFunction = new MDbgFunction(m_module, managedFunction);
                AddToCache(managedFunction.Token, funcVersion, mdbgFunction);
            }
            return(mdbgFunction);
        }
예제 #4
0
파일: Function.cs 프로젝트: pusp/o2platform
        /// <summary>
        /// Releases all resources used by the MDbgFunction.
        /// </summary>
        public void Dispose()
        {
            // Release unmanaged resources, especially symbol readers
            m_function = null;

            m_symMethod = null;
            m_SPoffsets = null;
            m_SPdocuments = null;
            m_SPstartLines = null;
            m_SPendLines = null;
            m_SPstartColumns = null;
            m_SPendColumns = null;
            m_SPcount = 0;
        }
예제 #5
0
파일: Function.cs 프로젝트: pusp/o2platform
        internal MDbgFunction(MDbgModule managedModule, CorDebug.CorFunction managedFunction)
        {
            Debug.Assert(managedModule != null);
            Debug.Assert(managedFunction != null);
            Debug.Assert(managedFunction.Version >= 0 && managedFunction.Version - 1 <= managedModule.EditsCounter);
            // version numbers starts with 1

            m_module = managedModule;
            m_function = managedFunction;
            EnsureIsUpToDate();
        }