Esempio n. 1
0
        public override Address GetAddress(ClrAppDomain appDomain, ClrThread thread)
        {
            if (_type == null)
                return 0;

            DesktopRuntimeBase runtime = _type.DesktopHeap.DesktopRuntime;
            IModuleData moduleData = runtime.GetModuleData(_field.Module);

            return runtime.GetThreadStaticPointer(thread.Address, (ClrElementType)_field.CorElementType, (uint)Offset, (uint)moduleData.ModuleId, _type.Shared);
        }
Esempio n. 2
0
        public override Address GetAddress(ClrAppDomain appDomain, ClrThread thread)
        {
            if (m_type == null)
            {
                return(0);
            }

            DesktopRuntimeBase runtime    = m_type.m_heap.m_runtime;
            IModuleData        moduleData = runtime.GetModuleData(m_field.Module);

            return(runtime.GetThreadStaticPointer(thread.Address, (ClrElementType)m_field.CorElementType, (uint)Offset, (uint)moduleData.ModuleId, m_type.Shared));
        }
Esempio n. 3
0
        public IEnumerable<MemoryRegion> EnumerateModuleHeaps(IAppDomainData appDomain, ulong addr)
        {
            Debug.Assert(appDomain != null);
            _appDomain = appDomain.Address;
            _regions.Clear();

            if (addr == 0)
                return _regions;

            IModuleData module = _runtime.GetModuleData(addr);
            if (module != null)
            {
                _type = ClrMemoryRegionType.ModuleThunkHeap;
                _runtime.TraverseHeap(module.ThunkHeap, _delegate);

                _type = ClrMemoryRegionType.ModuleLookupTableHeap;
                _runtime.TraverseHeap(module.LookupTableHeap, _delegate);
            }

            return _regions;
        }
Esempio n. 4
0
        public IEnumerable <MemoryRegion> EnumerateModuleHeaps(IAppDomainData appDomain, ulong addr)
        {
            Debug.Assert(appDomain != null);
            mAppDomain = appDomain.Address;
            mRegions.Clear();

            if (addr == 0)
            {
                return(mRegions);
            }

            IModuleData module = mRuntime.GetModuleData(addr);

            if (module != null)
            {
                mType = ClrMemoryRegionType.ModuleThunkHeap;
                mRuntime.TraverseHeap(module.ThunkHeap, mDelegate);

                mType = ClrMemoryRegionType.ModuleLookupTableHeap;
                mRuntime.TraverseHeap(module.LookupTableHeap, mDelegate);
            }

            return(mRegions);
        }