Class EmulateInstructionStateModifier

java.lang.Object
ghidra.pcode.emulate.EmulateInstructionStateModifier

@Deprecated(since="12.1", forRemoval=true) public abstract class EmulateInstructionStateModifier extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
EmulateInstructionStateModifier defines a language specific handler to assist emulation with adjusting the current execution state, providing support for custom pcodeop's (i.e., CALLOTHER). The implementation of this interface must provide a public constructor which takes a single Emulate argument.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Emulate
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected final Language
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Execute a CALLOTHER op
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the map of registered pcode userop behaviors
    void
    initialExecuteCallback(Emulate emulate, Address current_address, RegisterValue contextRegisterValue)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Emulation callback immediately before the first instruction is executed.
    void
    postExecuteCallback(Emulate emulate, Address lastExecuteAddress, PcodeOp[] lastExecutePcode, int lastPcodeIndex, Address currentAddress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Emulation callback immediately following execution of the lastExecuteAddress.
    protected final void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Register a pcodeop behavior corresponding to a CALLOTHER opcode.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • emu

      protected final Emulate emu
      Deprecated, for removal: This API element is subject to removal in a future version.
    • language

      protected final Language language
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • EmulateInstructionStateModifier

      protected EmulateInstructionStateModifier(Emulate emu)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • registerPcodeOpBehavior

      protected final void registerPcodeOpBehavior(String opName, OpBehaviorOther pcodeOpBehavior)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Register a pcodeop behavior corresponding to a CALLOTHER opcode.
      Parameters:
      opName - name as defined within language via "define pcodeop"
      pcodeOpBehavior -
    • executeCallOther

      public final boolean executeCallOther(PcodeOp op) throws LowlevelError
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute a CALLOTHER op
      Parameters:
      op -
      Returns:
      true if corresponding pcodeop was registered and emulation support is performed, or false if corresponding pcodeop is not supported by this class.
      Throws:
      LowlevelError
    • initialExecuteCallback

      public void initialExecuteCallback(Emulate emulate, Address current_address, RegisterValue contextRegisterValue) throws LowlevelError
      Deprecated, for removal: This API element is subject to removal in a future version.
      Emulation callback immediately before the first instruction is executed. This callback permits any language specific initializations to be performed.
      Parameters:
      emulate -
      current_address - intial execute address
      contextRegisterValue - initial context value or null if not applicable or unknown
      Throws:
      LowlevelError
    • postExecuteCallback

      public void postExecuteCallback(Emulate emulate, Address lastExecuteAddress, PcodeOp[] lastExecutePcode, int lastPcodeIndex, Address currentAddress) throws LowlevelError
      Deprecated, for removal: This API element is subject to removal in a future version.
      Emulation callback immediately following execution of the lastExecuteAddress. One use of this callback is to modify the flowing/future context state.
      Parameters:
      emulate -
      lastExecuteAddress -
      lastExecutePcode -
      lastPcodeIndex - pcode index of last op or -1 if no pcode or fall-through occurred.
      currentAddress -
      Throws:
      LowlevelError
    • getPcodeOpMap

      public Map<Integer,OpBehaviorOther> getPcodeOpMap()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the map of registered pcode userop behaviors
      Returns:
      the map, by userop index.