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); }
public override int ReadMemory(Address address, byte[] buffer, int offset, int count) { if (offset != 0) { throw new NotImplementedException("Non-zero offsets not supported (yet)"); } int bytesRead = 0; if (!m_runtime.ReadMemory(address, buffer, count, out bytesRead)) { return(0); } return(bytesRead); }