Ejemplo n.º 1
0
 public virtual int Compare(IFaultDefinition faultDefinition)
 {
     if (FaultAddress == faultDefinition.FaultAddress)
     {
         return(0);
     }
     else if (FaultAddress < faultDefinition.FaultAddress)
     {
         return(-1);
     }
     else if (FaultAddress > faultDefinition.FaultAddress)
     {
         return(1);
     }
     else
     {
         throw new InvalidOperationException();
     }
 }
Ejemplo n.º 2
0
        FaultResult _runFaultSimulation(IFaultDefinition faultDefinition, IPlatformEngine sim)
        {
            sim.Init();

            faultDefinition.InitSimulator(sim);

            var simResult = Result.Exception;
            SimulationException simException = null;

            try {
                simResult = sim.Run();
            }
            catch (SimulationException e) {
                simException = e;
            }

            return(new FaultResult {
                Fault = faultDefinition, Result = simResult, Exception = simException
            });
        }
Ejemplo n.º 3
0
        public override int Compare(IFaultDefinition faultDefinition)
        {
            if (FaultAddress == faultDefinition.FaultAddress && faultDefinition is TransientInstructionFaultDefinition executedInstructionFaultDefinition)
            {
                if (BreakpointHitCount == executedInstructionFaultDefinition.BreakpointHitCount)
                {
                    return(0);
                }
                else if (BreakpointHitCount < executedInstructionFaultDefinition.BreakpointHitCount)
                {
                    return(-1);
                }
                else if (BreakpointHitCount > executedInstructionFaultDefinition.BreakpointHitCount)
                {
                    return(1);
                }
                else
                {
                    throw new InvalidOperationException();
                }
            }

            return(base.Compare(faultDefinition));
        }
Ejemplo n.º 4
0
 public int Compare(IFaultDefinition faultDefinition) => throw new System.NotImplementedException();