Esempio n. 1
0
 /// <summary>
 /// Creates a Step breakpoint using the specified parameters.
 /// </summary>
 /// <param name="originLocation">Origin location of the step.</param>
 /// <param name="kind">Step kind.</param>
 public StepBreakpoint(IProgramLocation originLocation, StepKind kind)
 {
     OriginLocation = originLocation;
     Kind = kind;
     OnExecute = true;
     IsOneShot = true;
     Enabled = true;
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a Step breakpoint using the specified parameters.
 /// </summary>
 /// <param name="originLocation">Origin location of the step.</param>
 /// <param name="kind">Step kind.</param>
 public StepBreakpoint(IProgramLocation originLocation, StepKind kind)
 {
     OriginLocation = originLocation;
     Kind           = kind;
     OnExecute      = true;
     IsOneShot      = true;
     Enabled        = true;
 }
Esempio n. 3
0
        public bool IsStepCompleted(IProgramLocation originLocation, StepKind stepKind)
        {
            PicoProgramLocation loc = (PicoProgramLocation)originLocation;
            ushort pc = Target.VirtualMachine.Data.DirectPC;
            ushort sp = Target.VirtualMachine.Data.DirectSP;

            switch (stepKind)
            {
            case StepKind.Into:
                // If PC is changed, a step is performed.
                return(pc != loc.PC);

            case StepKind.Over:
                // To complete a step over PC has to change, and the call stack has to remain the same.
                return(pc != loc.PC && sp == loc.SP);

            case StepKind.Out:
                // To step out of a subroutine, SP needs to increment (Pop RetAddress).
                return(sp > loc.SP);
            }
            return(false);            // Unreachable, but makes the compiler happy. :)
        }
Esempio n. 4
0
        public bool IsStepCompleted(IProgramLocation originLocation, StepKind stepKind)
        {
            PicoProgramLocation loc = (PicoProgramLocation)originLocation;
            ushort pc = Target.VirtualMachine.Data.DirectPC;
            ushort sp = Target.VirtualMachine.Data.DirectSP;

            switch (stepKind)
            {
                case StepKind.Into:
                    // If PC is changed, a step is performed.
                    return pc != loc.PC;
                case StepKind.Over:
                    // To complete a step over PC has to change, and the call stack has to remain the same.
                    return pc != loc.PC && sp == loc.SP;
                case StepKind.Out:
                    // To step out of a subroutine, SP needs to increment (Pop RetAddress).
                    return sp > loc.SP;
            }
            return false; // Unreachable, but makes the compiler happy. :)
        }