Interface IFlowInformation

All Known Implementing Classes:
FlowInformation

@Ser public interface IFlowInformation
Information relative to execution flow changes. Flow changes are important objects used to determine boundaries of basic blocks in a CFG.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the number of instructions in the delay slot.
    Get the a list of targets.
    boolean
    Determine if this object does contain flow information.
    boolean
    Determine if this object does contain flow information and all targets are known.
    boolean
    Determine if this object does contain flow information but has no known targets.
    boolean
    Indicate if the flow information includes a fall-through address (relative to the current instruction) that is not present in the FlowInfo object itself.
    boolean
    Indicate whether this flow information forbids the implicit calculation of a fall-through edge.
  • Method Details

    • isBroken

      boolean isBroken()
      Determine if this object does contain flow information.
      Returns:
      true is the flow is broken (eg, generic branch)
    • isBrokenUnknown

      boolean isBrokenUnknown()
      Determine if this object does contain flow information but has no known targets.

      IMPORTANT: if this flow info object is mixed (it specifies having unknown target(s), and also bears known targets), this method returns false.

      Returns:
      true if the flow is broken but no targets are known
    • isBrokenKnown

      boolean isBrokenKnown()
      Determine if this object does contain flow information and all targets are known.
      Returns:
      true if the flow is broken and all targets are known
    • getTargets

      List<ICodePointer> getTargets()
      Get the a list of targets. Be careful, this list does not include the fall-through target if it is implied (eg, when flow-info is returned by IInstruction.getRoutineCall(long)) or when its calculation was requested dynamically (via mustComputeFallThrough()).
      Returns:
      the list of addresses that must be checked, possibly empty. A null value signifies no-flow information.
    • mustComputeFallThrough

      boolean mustComputeFallThrough()
      Indicate if the flow information includes a fall-through address (relative to the current instruction) that is not present in the FlowInfo object itself. If this method returns true, the caller must dynamically calculate the fall-through address itself.

      Note that the creator of a flowinfo object may decide to add the fall-through (if any) in the flowinfo object target list. However, in some cases, such as branching instructions with delay slot(s), it is simpler to indicate that the branching instruction allows a fall-through flow, but that it should be computed by the client/user, instead of stored or computed by the flowinfo object.

      Returns:
      true if the flowinfo object does not include a fall-through address, false otherwise
    • noFallThrough

      boolean noFallThrough()
      Indicate whether this flow information forbids the implicit calculation of a fall-through edge. (A fall-through may be explicitly specified as a target, regardless.)
      Returns:
      true if the flowinfo specifies no fall-through
    • getDelaySlotCount

      int getDelaySlotCount()
      Get the number of instructions in the delay slot.
      Returns:
      number of instructions in delay slot