Package ghidra.pcode.emu.taint

# Class TaintPcodeThreadExecutor

java.lang.Object
ghidra.pcode.exec.PcodeExecutor<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>>
ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>>
ghidra.pcode.emu.taint.TaintPcodeThreadExecutor

public class TaintPcodeThreadExecutor extends DefaultPcodeThread.PcodeThreadExecutor<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>>
An instrumented executor for the Taint Analyzer

This part is responsible for executing all the actual p-code operations generated by each decoded instruction. Each thread in the emulator gets a distinct executor. So far, we haven't actually added any instrumentation, but the conditions of `PcodeOp.CBRANCH` operations will likely be examined by the user, so we set up the skeleton here.

- ## Field Summary

  ### Fields inherited from class ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor

  `thread`

  ### Fields inherited from class ghidra.pcode.exec.PcodeExecutor

  `arithmetic, language, pc, pcSize, reason, state`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TaintPcodeThreadExecutor(DefaultPcodeThread<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>> thread)`
  Create the executor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `executeConditionalBranch(PcodeOp op, PcodeFrame frame)`
  Execute a conditional branch

  ### Methods inherited from class ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor

  `afterLoad, afterStore, beforeLoad, beforeStore, branchToAddress, executeSleigh, getThread, onMissingUseropDef, stepOp`

  ### Methods inherited from class ghidra.pcode.exec.PcodeExecutor

  `badOp, begin, begin, branchInternal, branchToOffset, branchToOffset, checkInjectedTarget, doExecuteBranch, doExecuteIndirectBranch, execute, execute, executeBinaryOp, executeBranch, executeCall, executeCallother, executeIndirectBranch, executeIndirectCall, executeLoad, executeReturn, executeStore, executeUnaryOp, finish, getArithmetic, getBranchTarget, getCallotherOpNumber, getConditionalBranchPredicate, getIndirectBranchTarget, getIntConst, getLanguage, getLoadStoreOffset, getLoadStoreSpace, getReason, getState, getStoreValue, getUseropName, skip, step`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TaintPcodeThreadExecutor

    public TaintPcodeThreadExecutor(DefaultPcodeThread<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>> thread)
    Create the executor
    Parameters:
      `thread` - the thread being created

- ## Method Details

  - ### executeConditionalBranch

    public void executeConditionalBranch(PcodeOp op, PcodeFrame frame)
    Execute a conditional branch

    This is invoked on every `PcodeOp.CBRANCH`, allowing us a decent place to instrument the emulator and add some diagnostics. Refer to `PcodeExecutor.executeConditionalBranch(PcodeOp, PcodeFrame)` to see the operations inputs. Alternatively, we could override `PcodeArithmetic.isTrue(Object, Purpose)`; however, we'd have access to less contextual information at that position.

    Overrides:
      `executeConditionalBranch` in class `PcodeExecutor<org.apache.commons.lang3.tuple.Pair<byte[],TaintVec>>`
    Parameters:
      `op` - the op
      `frame` - the frame