Esempio n. 1
0
        private static byte[] ReadBuffer(View view, Native.MinidumpLocationDescriptor location)
        {
            if (location.DataSize == 0)
            {
                return(Array.Empty <byte>());
            }

            var buffer = new byte[location.DataSize];

            Marshal.Copy(view.GetPointer(location), buffer, startIndex: 0, buffer.Length);
            return(buffer);
        }
Esempio n. 2
0
 public nint GetPointer(Native.MinidumpLocationDescriptor location) => GetPointer(location.Rva, location.DataSize);
Esempio n. 3
0
        private static bool FindStream(IReadOnlyList <Native.MinidumpDirectory> directory, Native.MinidumpStreamType streamType, out Native.MinidumpLocationDescriptor location)
        {
            var directoryEntry = directory.Where(d => d.StreamType == streamType).SingleOrDefault();

            location = directoryEntry.Location;
            return(directoryEntry.StreamType == streamType);
        }