Beispiel #1
0
        /// <summary>
        /// Creates an empty imagemap based on the absolute memory map. It is
        /// the caller's responsibility to fill in the MemoryArea properties
        /// of each resulting ImageSegment.
        /// </summary>
        /// <returns></returns>
        public virtual SegmentMap CreateAbsoluteMemoryMap()
        {
            if (this.MemoryMap == null || this.MemoryMap.Segments == null)
            {
                return(null);
            }
            var diagSvc = Services.RequireService <IDiagnosticsService>();
            var segs    = MemoryMap.Segments.Select(s => MemoryMap_v1.LoadSegment(s, this, diagSvc))
                          .Where(s => s != null)
                          .ToSortedList(s => s.Address);

            return(new SegmentMap(
                       segs.Values.First().Address,
                       segs.Values.ToArray()));
        }