Enum Class FlowOverride

java.lang.Object
java.lang.Enum<FlowOverride>
ghidra.program.model.listing.FlowOverride
All Implemented Interfaces:
Serializable, Comparable<FlowOverride>, Constable

public enum FlowOverride extends Enum<FlowOverride>
  • Enum Constant Details

    • 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
            CALLIND -> BRANCHIND
            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, CALL, 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>
            CALL -> CALL/RETURN
            CALLIND -> CALLIND/RETURN
            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 Details

    • values

      public static FlowOverride[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FlowOverride valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      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