Enum FlowOverride

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FlowOverride>

    public enum FlowOverride
    extends java.lang.Enum<FlowOverride>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BRANCH
      Override the primary CALL or RETURN with a suitable JUMP operation.
      CALL
      Override the primary BRANCH or RETURN with a suitable CALL operation.
      CALL_RETURN
      Override the primary BRANCH or RETURN with a suitable CALL/RETURN operation.
      NONE
      No flow override has been established
      RETURN
      Override the primary BRANCH or CALL with a suitable RETURN operation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static FlowOverride getFlowOverride​(int ordinal)
      Return FlowOrdinal with the specified ordinal value.
      static FlowType getModifiedFlowType​(FlowType originalFlowType, FlowOverride flowOverride)
      Get modified FlowType resulting from the application of the specified flowOverride
      static FlowOverride valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static FlowOverride[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NONE

        public static final FlowOverride NONE
        No flow override has been established
      • BRANCH

        public static final FlowOverride BRANCH
        Override the primary CALL or RETURN with a suitable JUMP operation.
           Pcode mapping:
              CALL -> BRANCH
              RETURN -> BRANCHIND
         
      • CALL

        public static final FlowOverride CALL
        Override the primary BRANCH or RETURN with a suitable CALL operation.
         	 Pcode mapping:
         		BRANCH -> CALL
              BRANCHIND -> CALLIND
              CBRANCH <addr>,<cond> -> (complex mapping)
                  tmp = BOOL_NEGATE <cond>
              	CBRANCH <label>,tmp
                  CALL <addr>
                <label>
              RETURN -> CALLIND
         
      • CALL_RETURN

        public static final FlowOverride CALL_RETURN
        Override the primary BRANCH or RETURN with a suitable CALL/RETURN operation.
         	 Pcode mapping:
         		BRANCH -> CALL/RETURN
              BRANCHIND -> CALLIND/RETURN
              CBRANCH <addr>,<cond> -> (complex mapping)
                  tmp = BOOL_NEGATE <cond>
              	CBRANCH <label>,tmp
                  CALL <addr>
                  RETURN 0
                <label>
              RETURN -> CALLIND/RETURN
         
      • RETURN

        public static final FlowOverride RETURN
        Override the primary BRANCH or CALL with a suitable RETURN operation.
           Pcode mapping:
              BRANCH <addr>  -> (complex mapping)
                  tmp = COPY &<addr>
                  RETURN tmp
              BRANCHIND -> RETURN
              CBRANCH <addr>,<cond>  -> (complex mapping)
              	tmp = BOOL_NEGATE <cond>
              	CBRANCH <label>,tmp
                  tmp2 = COPY &<addr>
                  RETURN tmp2
                <label>
              CALL <addr>    -> (complex mapping)
                  tmp = COPY &<addr>
                  RETURN tmp
              CALLIND -> RETURN
         
    • Method Detail

      • values

        public static FlowOverride[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FlowOverride c : FlowOverride.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FlowOverride valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getFlowOverride

        public static FlowOverride getFlowOverride​(int ordinal)
        Return FlowOrdinal with the specified ordinal value. NONE will be returned for an unknown value.
        Parameters:
        ordinal -
        Returns:
        FlowOrdinal
      • getModifiedFlowType

        public static FlowType getModifiedFlowType​(FlowType originalFlowType,
                                                   FlowOverride flowOverride)
        Get modified FlowType resulting from the application of the specified flowOverride
        Parameters:
        originalFlowType -
        flowOverride -
        Returns:
        modified flow type