Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        /// <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
        }
Exemplo n.º 3
0
 // MemoryAddress should be a class?
 public static MemoryAddress GetRegionSpecificAddress(this MemoryAddress address, MemoryRegionType?region)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public CanReadMemoryAtAddress(MemoryAddress address, double probability = 1.0)
     : base(AssumptionName.CanReadMemoryAtAddress, probability)
 {
     this.Address = address;
 }
Exemplo n.º 5
0
 public CanDetermineDisplacementToAddress(MemoryAddress address, double probability = 1.0)
     : base(AssumptionName.CanDetermineDisplacementToAddress, probability)
 {
     this.Address = address;
 }
Exemplo n.º 6
0
 public CanPositionAtDesiredRelativeAddress(MemoryAddress address, double probability = 1.0)
     : base(AssumptionName.CanPositionAtDesiredRelativeAddress, probability)
 {
     this.Address = address;
 }