示例#1
0
        public InteropBreakpoint ToInteropBreakpoint()
        {
            InteropBreakpoint bp = new InteropBreakpoint()
            {
                Type = Type,
                IsAbsoluteAddress = IsAbsoluteAddress
            };

            switch (AddressType)
            {
            case BreakpointAddressType.AnyAddress:
                bp.StartAddress = -1;
                bp.EndAddress   = -1;
                break;

            case BreakpointAddressType.SingleAddress:
                bp.StartAddress = (Int32)Address;
                bp.EndAddress   = -1;
                break;

            case BreakpointAddressType.AddressRange:
                bp.StartAddress = (Int32)StartAddress;
                bp.EndAddress   = (Int32)EndAddress;
                break;
            }

            bp.Condition = new byte[1000];
            byte[] condition = Encoding.UTF8.GetBytes(Condition);
            Array.Copy(condition, bp.Condition, condition.Length);
            return(bp);
        }
示例#2
0
        public InteropBreakpoint ToInteropBreakpoint(int breakpointId)
        {
            InteropBreakpoint bp = new InteropBreakpoint()
            {
                Id         = breakpointId,
                MemoryType = MemoryType,
                Type       = Type,
                MarkEvent  = MarkEvent,
                Enabled    = Enabled
            };

            switch (AddressType)
            {
            case BreakpointAddressType.AnyAddress:
                bp.StartAddress = -1;
                bp.EndAddress   = -1;
                break;

            case BreakpointAddressType.SingleAddress:
                bp.StartAddress = (Int32)Address;
                bp.EndAddress   = -1;
                break;

            case BreakpointAddressType.AddressRange:
                bp.StartAddress = (Int32)StartAddress;
                bp.EndAddress   = (Int32)EndAddress;
                break;
            }

            bp.Condition = new byte[1000];
            byte[] condition = Encoding.UTF8.GetBytes(Condition.Replace(Environment.NewLine, " "));
            Array.Copy(condition, bp.Condition, condition.Length);
            return(bp);
        }
示例#3
0
        public InteropBreakpoint ToInteropBreakpoint()
        {
            InteropBreakpoint bp = new InteropBreakpoint()
            {
                Address = SpecificAddress ? (Int32)Address : -1, Type = Type, IsAbsoluteAddress = IsAbsoluteAddress
            };

            bp.Condition = new byte[1000];
            byte[] condition = Encoding.UTF8.GetBytes(Condition);
            Array.Copy(condition, bp.Condition, condition.Length);
            return(bp);
        }