Interface InstructionAdapterFromPrototype

All Superinterfaces:
CodeUnit, Instruction, MemBuffer, ProcessorContext, ProcessorContextView, PropertySet, TraceCodeUnit, TraceInstruction
All Known Implementing Classes:
DBTraceInstruction

public interface InstructionAdapterFromPrototype extends TraceInstruction
  • Method Details

    • getFullString

      default String getFullString()
    • getMnemonicString

      default String getMnemonicString()
      Description copied from interface: CodeUnit
      Returns the mnemonic for this code unit, e.g., MOV, JMP.
      Specified by:
      getMnemonicString in interface CodeUnit
      Returns:
      the mnemonic for this code unit, e.g., MOV, JMP
    • getNumOperands

      default int getNumOperands()
      Description copied from interface: CodeUnit
      Returns the number of operands for this code unit..
      Specified by:
      getNumOperands in interface CodeUnit
      Returns:
      the number of operands for this code unit.
    • getAddress

      default Address getAddress(int opIndex)
      Description copied from interface: CodeUnit
      Get the Address for the given operand index if one exists. Data objects have one operand (the value).
      Specified by:
      getAddress in interface CodeUnit
      Parameters:
      opIndex - index of the operand.
      Returns:
      An address if the operand represents a fully qualified address (given the context), or if the operand is a Scalar treated as an address. Null is returned if no address or scalar exists on that operand.
    • getScalar

      default Scalar getScalar(int opIndex)
      Description copied from interface: CodeUnit
      Returns the scalar at the given operand index. Data objects have one operand (the value).
      Specified by:
      getScalar in interface CodeUnit
      Parameters:
      opIndex - index of the operand.
      Returns:
      the scalar at the given operand index or null if no scalar exists at that index.
    • getRegister

      default Register getRegister(int opIndex)
      Description copied from interface: Instruction
      If operand is a pure Register, return the register.
      Specified by:
      getRegister in interface Instruction
      Parameters:
      opIndex - index of the operand.
      Returns:
      A register if the operand represents a register.
    • getOpObjects

      default Object[] getOpObjects(int opIndex)
      Description copied from interface: Instruction
      Get objects used by this operand (Address, Scalar, Register ...)
      Specified by:
      getOpObjects in interface Instruction
      Parameters:
      opIndex - index of the operand.
      Returns:
      objects used by this operand (Address, Scalar, Register ...)
    • getInputObjects

      default Object[] getInputObjects()
      Description copied from interface: Instruction
      Get the Input objects used by this instruction. These could be Scalars, Registers, Addresses
      Specified by:
      getInputObjects in interface Instruction
      Returns:
      an array of objects that are used by this instruction
    • getResultObjects

      default Object[] getResultObjects()
      Description copied from interface: Instruction
      Get the Result objects produced/affected by this instruction These would probably only be Register or Address
      Specified by:
      getResultObjects in interface Instruction
      Returns:
      an array of objects that are affected by this instruction
    • getDefaultOperandRepresentation

      default String getDefaultOperandRepresentation(int opIndex)
      Description copied from interface: Instruction
      Get the operand representation for the given operand index without markup.
      Specified by:
      getDefaultOperandRepresentation in interface Instruction
      Parameters:
      opIndex - operand index
      Returns:
      operand represented as a string.
    • getDefaultOperandRepresentationList

      default List<Object> getDefaultOperandRepresentationList(int opIndex)
      Description copied from interface: Instruction
      Get the operand representation for the given operand index. A list of Register, Address, Scalar, Character and String objects is returned - without markup!
      Specified by:
      getDefaultOperandRepresentationList in interface Instruction
      Parameters:
      opIndex - operand index
      Returns:
      ArrayList of pieces of the operand representation. Unsupported languages may return null.
    • getSeparator

      default String getSeparator(int opIndex)
      Description copied from interface: Instruction
      Get the separator strings between an operand. The separator string for 0 are the characters before the first operand. The separator string for numOperands+1 are the characters after the last operand.
      Specified by:
      getSeparator in interface Instruction
      Parameters:
      opIndex - valid values are 0 thru numOperands+1
      Returns:
      separator string, or null if there is no string
    • getOperandType

      default int getOperandType(int opIndex)
      Description copied from interface: Instruction
      Get the type of a specific operand.
      Specified by:
      getOperandType in interface Instruction
      Parameters:
      opIndex - the index of the operand. (zero based)
      Returns:
      the type of the operand.
      See Also:
    • getOperandRefType

      default RefType getOperandRefType(int opIndex)
      Description copied from interface: Instruction
      Get the operand reference type for the given operand index.
      Specified by:
      getOperandRefType in interface Instruction
      Parameters:
      opIndex - operand index
      Returns:
      the operand reference type for the given operand index.
    • getDefaultFallThroughOffset

      default int getDefaultFallThroughOffset()
      Description copied from interface: Instruction
      Get default fall-through offset in bytes from start of instruction to the fallthrough instruction. This accounts for any instructions contained with delay slots.
      Specified by:
      getDefaultFallThroughOffset in interface Instruction
      Returns:
      default fall-through offset or zero (0) if instruction has no fallthrough
    • getPcode

      default PcodeOp[] getPcode()
      Description copied from interface: Instruction
      Get an array of PCode operations (micro code) that this instruction performs. Flow overrides are not factored into pcode.
      Specified by:
      getPcode in interface Instruction
      Returns:
      an array of Pcode operations, a zero length array if the language does not support PCode
    • getPcode

      default PcodeOp[] getPcode(boolean includeOverrides)
      Description copied from interface: Instruction
      Get an array of PCode operations (micro code) that this instruction performs. NOTE: If includeOverrides is true, unique temporary varnodes may be produced which vary in size to those produced for other instructions.
      Specified by:
      getPcode in interface Instruction
      Parameters:
      includeOverrides - if true any flow overrides will be factored into generated pcode.
      Returns:
      an array of Pcode operations, a zero length array if the language does not support PCode
    • getPcode

      default PcodeOp[] getPcode(int opIndex)
      Get an array of PCode operations (micro code) that a particular operand performs to compute its value. NOTE: This assumes operand pcode is not affected by flow override
      Specified by:
      getPcode in interface Instruction
      Parameters:
      opIndex - index of the operand to retrieve PCode
      Returns:
      an array of PCode operations, a zero length array if the language does not support PCode
    • getDelaySlotDepth

      default int getDelaySlotDepth()
      Description copied from interface: Instruction
      Get the number of delay slot instructions for this argument. This should be 0 for instructions which don't have a delay slot. This is used to support the delay slots found on some RISC processors such as SPARC and the PA-RISC. This returns an integer instead of a boolean in case some other processor executes more than one instruction from a delay slot.
      Specified by:
      getDelaySlotDepth in interface Instruction
      Returns:
      delay slot depth (number of instructions)
    • isInDelaySlot

      default boolean isInDelaySlot()
      Specified by:
      isInDelaySlot in interface Instruction
      Returns:
      true if this instruction was disassembled in a delay slot