private void InitFromMemory64List() { _memory64List = new MinidumpMemory64List(_dumpStream); RVA64 currentRVA = _memory64List.BaseRva; ulong count = _memory64List.Count; // Initialize all chunks. MINIDUMP_MEMORY_DESCRIPTOR64 tempMD; List <MinidumpMemoryChunk> chunks = new List <MinidumpMemoryChunk>(); for (ulong i = 0; i < count; i++) { tempMD = _memory64List.GetElement((uint)i); MinidumpMemoryChunk chunk = new MinidumpMemoryChunk { Size = tempMD.DataSize, TargetStartAddress = tempMD.StartOfMemoryRange, TargetEndAddress = tempMD.StartOfMemoryRange + tempMD.DataSize, RVA = currentRVA.Value }; currentRVA.Value += tempMD.DataSize; chunks.Add(chunk); } chunks.Sort(); SplitAndMergeChunks(chunks); _chunks = chunks.ToArray(); Count = (ulong)chunks.Count; ValidateChunks(); }
public MinidumpMemoryChunks(DumpPointer rawStream, MINIDUMP_STREAM_TYPE type) { Count = 0; _memory64List = null; _memoryList = null; _listType = MINIDUMP_STREAM_TYPE.UnusedStream; if (type != MINIDUMP_STREAM_TYPE.MemoryListStream && type != MINIDUMP_STREAM_TYPE.Memory64ListStream) { throw new ClrDiagnosticsException("Type must be either MemoryListStream or Memory64ListStream", ClrDiagnosticsExceptionKind.CrashDumpError); } _listType = type; _dumpStream = rawStream; if (MINIDUMP_STREAM_TYPE.Memory64ListStream == type) { InitFromMemory64List(); } else { InitFromMemoryList(); } }