Ejemplo n.º 1
0
        public SlicerResult VisitTestCondition(TestCondition tc, BackwardSlicerContext ctx)
        {
            var se = tc.Expression.Accept(this, BackwardSlicerContext.Cond(RangeOf(tc.Expression)));

            this.ccNext = tc.ConditionCode;
            return(se);
        }
Ejemplo n.º 2
0
        public SlicerResult VisitGoto(RtlGoto go)
        {
            var sr = go.Target.Accept(this, BackwardSlicerContext.Cond(RangeOf(go.Target)));

            if (JumpTableFormat == null)
            {
                JumpTableFormat = go.Target;
            }
            return(sr);
        }
Ejemplo n.º 3
0
        public SlicerResult VisitConditionOf(ConditionOf cof, BackwardSlicerContext ctx)
        {
            var se = cof.Expression.Accept(this, BackwardSlicerContext.Cond(RangeOf(cof.Expression)));

            if (se != null && !se.Stop)
            {
                se.SrcExpr               = cof;
                this.JumpTableIndex      = cof.Expression;
                this.JumpTableIndexToUse = cof.Expression;
            }
            return(se);
        }
Ejemplo n.º 4
0
        public SlicerResult VisitBranch(RtlBranch branch)
        {
            var se         = branch.Condition.Accept(this, BackwardSlicerContext.Cond(new BitRange(0, 0)));
            var addrTarget = branch.Target as Address;

            if (addrTarget == null)
            {
                throw new NotImplementedException();    //$REVIEW: do we ever see this?
            }
            if (this.addrSucc != addrTarget)
            {
                this.invertCondition = true;
            }
            return(se);
        }