Beispiel #1
0
        bool FillGCDesc()
        {
            RhRuntime runtime = m_heap.m_runtime;

            int entries;

            if (!runtime.MemoryReader.TryReadDword(m_eeType - (ulong)IntPtr.Size, out entries))
            {
                return(false);
            }

            // Get entries in map
            if (entries < 0)
            {
                entries = -entries;
            }

            int read;
            int slots = 1 + entries * 2;

            byte[] buffer = new byte[slots * IntPtr.Size];
            if (!runtime.ReadMemory(m_eeType - (ulong)(slots * IntPtr.Size), buffer, buffer.Length, out read) || read != buffer.Length)
            {
                return(false);
            }

            // Construct the gc desc
            m_gcDesc = new GCDesc(buffer);
            return(true);
        }
Beispiel #2
0
 public RhModule(RhRuntime runtime, ModuleInfo module)
 {
     m_runtime   = runtime;
     m_name      = string.IsNullOrEmpty(module.FileName) ? "" : Path.GetFileNameWithoutExtension(module.FileName);
     m_filename  = module.FileName;
     m_imageBase = module.ImageBase;
     m_size      = module.FileSize;
 }
Beispiel #3
0
 public RhModule(RhRuntime runtime, ModuleInfo module)
 {
     m_runtime = runtime;
     m_name = string.IsNullOrEmpty(module.FileName) ? "" : Path.GetFileNameWithoutExtension(module.FileName);
     m_filename = module.FileName;
     m_imageBase = module.ImageBase;
     m_size = module.FileSize;
 }
Beispiel #4
0
 public RhStaticVar(RhRuntime runtime, Address addr, Address obj, ClrType type, string name, bool pinned, bool interior)
 {
     Address     = addr;
     Object      = obj;
     m_type      = type;
     m_name      = name;
     m_pinned    = pinned;
     m_interior  = interior;
     m_type      = runtime.GetHeap().GetObjectType(obj);
     m_appDomain = runtime.GetRhAppDomain();
 }
Beispiel #5
0
        internal RhHeap(RhRuntime runtime, RhModule[] modules, TextWriter log)
            : base(runtime)
        {
            Log = log;
            m_runtime = runtime;
            m_modules = modules;
            m_mrtModule = FindMrtModule();

            CreateFreeType();
            InitSegments(runtime);
        }
Beispiel #6
0
        internal RhHeap(RhRuntime runtime, RhModule[] modules, TextWriter log)
            : base(runtime)
        {
            Log         = log;
            m_runtime   = runtime;
            m_modules   = modules;
            m_mrtModule = FindMrtModule();

            CreateFreeType();
            InitSegments(runtime);
        }
Beispiel #7
0
 public RhStaticRootWalker(RhRuntime runtime, bool resolveStatics)
 {
     Roots     = new List <ClrRoot>(128);
     m_runtime = resolveStatics ? runtime : null;
     m_heap    = m_runtime.GetHeap();
 }
Beispiel #8
0
 public RhHandleRootWalker(RhRuntime runtime, bool dependentHandleSupport)
 {
     m_heap             = runtime.GetHeap();
     m_domain           = runtime.GetRhAppDomain();
     m_dependentSupport = dependentHandleSupport;
 }
Beispiel #9
0
 public RhStaticRootWalker(RhRuntime runtime, bool resolveStatics)
 {
     Roots = new List<ClrRoot>(128);
     m_runtime = resolveStatics ? runtime : null;
     m_heap = m_runtime.GetHeap();
 }
Beispiel #10
0
 public RhHandleRootWalker(RhRuntime runtime, bool dependentHandleSupport)
 {
     m_heap = runtime.GetHeap();
     m_domain = runtime.GetRhAppDomain();
     m_dependentSupport = dependentHandleSupport;
 }
Beispiel #11
0
 public RhStaticVar(RhRuntime runtime, Address addr, Address obj, ClrType type, string name, bool pinned, bool interior)
 {
     Address = addr;
     Object = obj;
     m_type = type;
     m_name = name;
     m_pinned = pinned;
     m_interior = interior;
     m_type = runtime.GetHeap().GetObjectType(obj);
     m_appDomain = runtime.GetRhAppDomain();
 }