Package ghidra.trace.model.listing

# Interface TraceInstruction

All Superinterfaces:
  `CodeUnit`, `Instruction`, `MemBuffer`, `ProcessorContext`, `ProcessorContextView`, `PropertySet`, `TraceCodeUnit`

All Known Subinterfaces:
  `InstructionAdapterFromPrototype`

All Known Implementing Classes:
  `DBTraceInstruction`

public interface TraceInstruction extends TraceCodeUnit, Instruction
An instruction in a `Trace`

- ## Field Summary

  ### Fields inherited from interface ghidra.program.model.listing.CodeUnit

  `COMMENT_PROPERTY, DEFINED_DATA_PROPERTY, EOL_COMMENT, INSTRUCTION_PROPERTY, MNEMONIC, PLATE_COMMENT, POST_COMMENT, PRE_COMMENT, REPEATABLE_COMMENT, SPACE_PROPERTY`

  ### Fields inherited from interface ghidra.program.model.listing.Instruction

  `INVALID_DEPTH_CHANGE, MAX_LENGTH_OVERRIDE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Address`
  `getDefaultFallThrough()`
  Get the default fallthrough for this instruction.
  `Address[]`
  `getDefaultFlows()`
  Get an array of Address objects for all default flows established by the underlying instruction prototype.
  `Address`
  `getGuestDefaultFallThrough()`
  Get the default fall-through as viewed in the instruction's native address space
  `Address[]`
  `getGuestDefaultFlows()`
  Get the default flows as viewed in the instruction's native address space
  `TraceInstruction`
  `getNext()`
  `TraceInstruction`
  `getPrevious()`

  ### Methods inherited from interface ghidra.program.model.listing.CodeUnit

  `addMnemonicReference, addOperandReference, compareTo, contains, getAddress, getAddressString, getBytes, getBytesInCodeUnit, getComment, getComment, getCommentAsArray, getCommentAsArray, getExternalReference, getLabel, getLength, getMaxAddress, getMinAddress, getMnemonicString, getNumOperands, getPrimarySymbol, getReferenceIteratorTo, getScalar, getSymbols, removeExternalReference, removeMnemonicReference, removeOperandReference, setComment, setComment, setCommentAsArray, setCommentAsArray, setPrimaryMemoryReference, setRegisterReference, setStackReference`

  ### Methods inherited from interface ghidra.program.model.listing.Instruction

  `clearFallThroughOverride, getDefaultFallThroughOffset, getDefaultOperandRepresentation, getDefaultOperandRepresentationList, getDelaySlotDepth, getFallFrom, getFallThrough, getFlowOverride, getFlows, getFlowType, getInputObjects, getInstructionContext, getOperandRefType, getOperandType, getOpObjects, getParsedBytes, getParsedLength, getPcode, getPcode, getPcode, getPrototype, getRegister, getResultObjects, getSeparator, hasFallthrough, isFallthrough, isFallThroughOverridden, isInDelaySlot, isLengthOverridden, setFallThrough, setFlowOverride, setLengthOverride`

  ### Methods inherited from interface ghidra.program.model.mem.MemBuffer

  `getAddress, getBigInteger, getByte, getBytes, getInputStream, getInputStream, getInt, getLong, getMemory, getShort, getUnsignedByte, getUnsignedInt, getUnsignedShort, getVarLengthInt, getVarLengthUnsignedInt, isBigEndian, isInitializedMemory`

  ### Methods inherited from interface ghidra.program.model.lang.ProcessorContext

  `clearRegister, setRegisterValue, setValue`

  ### Methods inherited from interface ghidra.program.model.lang.ProcessorContextView

  `getBaseContextRegister, getRegister, getRegisters, getRegisterValue, getValue, hasValue`

  ### Methods inherited from interface ghidra.program.model.util.PropertySet

  `getIntProperty, getObjectProperty, getStringProperty, getVoidProperty, hasProperty, propertyNames, removeProperty, setProperty, setProperty, setProperty, setProperty`

  ### Methods inherited from interface ghidra.trace.model.listing.TraceCodeUnit

  `delete, getBounds, getBytes, getEndSnap, getLanguage, getLifespan, getMnemonicReferences, getOperandReferences, getPlatform, getPrimaryReference, getProgram, getProperty, getRange, getReferencesFrom, getStartSnap, getThread, getTrace, setEndSnap, setProperty, setTypedProperty`

- ## Method Details

  - ### getDefaultFallThrough

    Address getDefaultFallThrough()
    Get the default fallthrough for this instruction. This accounts for any instructions contained with delay slots.

    If the instruction is of a guest language, the returned address is mapped into the trace's base address space

    Specified by:
      `getDefaultFallThrough` in interface `Instruction`
    Returns:
      fall-through address or null if instruction has no default fallthrough

  - ### getGuestDefaultFallThrough

    Address getGuestDefaultFallThrough()
    Get the default fall-through as viewed in the instruction's native address space
    Returns:
      the default fall-through

  - ### getDefaultFlows

    Address[] getDefaultFlows()
    Get an array of Address objects for all default flows established by the underlying instruction prototype. References are ignored.

    If the instruction is of a guest language, the returned addresses are mapped into the trace's base address space

    Specified by:
      `getDefaultFlows` in interface `Instruction`
    Returns:
      flow addresses or null if there are no flows

  - ### getGuestDefaultFlows

    Address[] getGuestDefaultFlows()
    Get the default flows as viewed in the instruction's native address space
    Returns:
      the default flows

  - ### getNext

    TraceInstruction getNext()

    Note that it is possible instructions are staggered vertically, in which case, multiple instructions may immediately follow this in terms of the address. The rule to resolve this ambiguity is that we only consider instructions containing the starting snap of this instruction.

    Specified by:
      `getNext` in interface `Instruction`
    Returns:
      the instruction following this one in address order or null if none found.

  - ### getPrevious

    TraceInstruction getPrevious()

    Note that it is possible instructions are staggered vertically, in which case, multiple instruction may immediately precede this in terms of the address. The rule to resolve this ambiguity is that we only consider instructions containing the start snap of this instruction.

    Specified by:
      `getPrevious` in interface `Instruction`
    Returns:
      the instruction before this one in address order or null if none found.