Class DefaultPcodeThread.PcodeThreadExecutor<T>

java.lang.Object
ghidra.pcode.exec.PcodeExecutor<T>
ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor<T>
Enclosing class:
DefaultPcodeThread<T>

public static class DefaultPcodeThread.PcodeThreadExecutor<T> extends PcodeExecutor<T>
An executor for the p-code thread

This executor checks for thread suspension and updates the program counter register upon execution of (external) branches.

  • Field Details

  • Constructor Details

  • Method Details

    • executeSleigh

      public void executeSleigh(String source)
      Description copied from class: PcodeExecutor
      Compile and execute a block of Sleigh
      Overrides:
      executeSleigh in class PcodeExecutor<T>
      Parameters:
      source - the Sleigh source
    • stepOp

      public void stepOp(PcodeOp op, PcodeFrame frame, PcodeUseropLibrary<T> library)
      Description copied from class: PcodeExecutor
      Step on p-code op
      Overrides:
      stepOp in class PcodeExecutor<T>
      Parameters:
      op - the op
      frame - the current frame
      library - the library, invoked in case of PcodeOp.CALLOTHER
    • checkLoad

      protected void checkLoad(AddressSpace space, T offset, int size)
      Description copied from class: PcodeExecutor
      Extension point: logic preceding a load
      Overrides:
      checkLoad in class PcodeExecutor<T>
      Parameters:
      space - the address space to be loaded from
      offset - the offset about to be loaded from
      size - the size in bytes to be loaded
    • checkStore

      protected void checkStore(AddressSpace space, T offset, int size)
      Description copied from class: PcodeExecutor
      Extension point: logic preceding a store
      Overrides:
      checkStore in class PcodeExecutor<T>
      Parameters:
      space - the address space to be stored to
      offset - the offset about to be stored to
      size - the size in bytes to be stored
    • branchToAddress

      protected void branchToAddress(Address target)
      Description copied from class: PcodeExecutor
      Extension point: Called when execution branches to a target address

      NOTE: This is not called for the fall-through case

      Overrides:
      branchToAddress in class PcodeExecutor<T>
      Parameters:
      target - the target address
    • onMissingUseropDef

      protected void onMissingUseropDef(PcodeOp op, PcodeFrame frame, String opName, PcodeUseropLibrary<T> library)
      Description copied from class: PcodeExecutor
      Extension point: Behavior when a userop definition was not found in the library

      The default behavior is to throw a SleighLinkException.

      Overrides:
      onMissingUseropDef in class PcodeExecutor<T>
      Parameters:
      op - the op
      frame - the frame
      opName - the name of the p-code userop
      library - the library
    • getThread

      public DefaultPcodeThread<T> getThread()
      Get the thread owning this executor
      Returns:
      the thread