Class InstructionHints

java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.items.InstructionHints

@Ser public class InstructionHints extends Object
Hints for concrete instruction items.
  • Constructor Details

    • InstructionHints

      public InstructionHints()
      Create empty instruction hints.
  • Method Details

    • setStackPointerDelta

      public void setStackPointerDelta(Integer spDelta)
      Set the stack-pointer delta after the execution of an instruction. Typically, this is used on branching instructions to dynamic callsites that have not been determined automatically.
      Parameters:
      spDelta - a delta; null to remove
    • getStackPointerDelta

      public Integer getStackPointerDelta()
      Get the stack-pointer delta after the execution of an instruction.
      Returns:
      an integer or null if none
    • setCallsitePrototype

      public void setCallsitePrototype(IPrototypeItem callsiteProto)
      Set the prototype associated with a callsite target. Typically, this is used on branching instructions instructions to dynamic callsites that have not been determined automatically.
      Parameters:
      callsiteProto - a prototype; null to remove
    • getCallsitePrototype

      public IPrototypeItem getCallsitePrototype()
      Get the prototype associated with a callsite target.
      Returns:
      a prototype or null if none
    • isTailCall

      public boolean isTailCall()
      Determine whether the instruction should be treated as a tail call.
      Returns:
      true for a tail call
    • setTailCall

      public void setTailCall(boolean isTailCall)
      Set whether the instruction should be treated as a tail call.
      Parameters:
      isTailCall - true for a tail call
    • isCondTailCall

      public boolean isCondTailCall()
      Determine whether the instruction should be treated as a conditional tail call.
      Returns:
      true for a conditional tail call
    • setCondTailCall

      public void setCondTailCall(boolean isCondTailCall)
      Set whether the instruction should be treated as a conditional tail call.
      Parameters:
      isCondTailCall - true for a conditional tail call
    • getSwitchDispatcher

      public int getSwitchDispatcher()
      Get value indicating whether branching instruction may be a switch dispatcher (heuristic).
      Returns:
      0:no, 1: yes, not processed, 2: yes, processed
    • setSwitchDispatcher

      public void setSwitchDispatcher(int switchDispatcher)
      Set whether the branching instruction may be a switch dispatcher.
      Parameters:
      switchDispatcher - 0:no, 1: yes, not processed, 2: yes, processed
    • isFakeCall

      public boolean isFakeCall()
      Determine whether the instruction is a fake call.
      Returns:
      true if instruction is a routine call that should be considered as an intra-routine branch, false otherwise.
    • setFakeCall

      public void setFakeCall(boolean isFakeCall)
      Set whether the instruction is a fake call.
      Parameters:
      isFakeCall - true for a fake call
    • isActualCall

      public boolean isActualCall()
      Determine whether the instruction is known to be an actual call.
      Returns:
      true for an actual call
    • setActualCall

      public void setActualCall(boolean isActualCall)
      Set whether the instruction is known to be an actual call.
      Parameters:
      isActualCall - true for an actual call
    • isCustomBranchingInstruction

      public boolean isCustomBranchingInstruction()
      Determine whether custom branching behavior is present.
      Returns:
      true if any custom branching hint is set