コード例 #1
0
ファイル: Enum.cs プロジェクト: microsoft/exsim
        public override bool Equals(object obj)
        {
            if (obj is MemoryAddress)
            {
                MemoryAddress objm = obj as MemoryAddress;

                return(objm.DataType == this.DataType && objm.Region == this.Region);
            }

            return(false);
        }
コード例 #2
0
ファイル: Enum.cs プロジェクト: microsoft/exsim
        /// <summary>
        /// Maps a memory address to regions that contain it.
        /// </summary>
        /// <param name="address"></param>
        /// <param name="domain"></param>
        /// <returns></returns>
        public static IEnumerable <MemoryRegion> MapToMemoryRegions(this MemoryAddress address, ExecutionDomain?domain)
        {
            throw new NotImplementedException();
#if false
            if (domain.IsUser())
            {
                switch (address.AddressType)
                {
                //
                // Stack return address.
                //
                case MemoryAddress.AddressOfStackReturnAddress:
                case MemoryAddress.AddressOfStackStructuredExceptionHandler:
                case MemoryAddress.AddressOfStackFramePointer:
                    yield return(MemoryRegion.UserThreadStack);

                    break;

                //
                // Stack return address.
                //
                case MemoryAddress.Data:
                    foreach (MemoryRegion region in MemoryRegions.UserWritableRegions)
                    {
                        yield return(region);
                    }
                    break;

                default:
                    throw new NotSupportedException(String.Format("Memory address <-> region mapping not defined for {0}", address));
                }
            }
            else
            {
                throw new NotImplementedException();
            }
#endif
        }
コード例 #3
0
ファイル: Enum.cs プロジェクト: microsoft/exsim
 // MemoryAddress should be a class?
 public static MemoryAddress GetRegionSpecificAddress(this MemoryAddress address, MemoryRegionType?region)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public CanReadMemoryAtAddress(MemoryAddress address, double probability = 1.0)
     : base(AssumptionName.CanReadMemoryAtAddress, probability)
 {
     this.Address = address;
 }
コード例 #5
0
 public CanDetermineDisplacementToAddress(MemoryAddress address, double probability = 1.0)
     : base(AssumptionName.CanDetermineDisplacementToAddress, probability)
 {
     this.Address = address;
 }
コード例 #6
0
 public CanPositionAtDesiredRelativeAddress(MemoryAddress address, double probability = 1.0)
     : base(AssumptionName.CanPositionAtDesiredRelativeAddress, probability)
 {
     this.Address = address;
 }