Class CSpecTestPCodeEmulator

java.lang.Object
ghidra.pcode.emu.AbstractPcodeMachine<byte[]>
ghidra.pcode.emu.PcodeEmulator
ghidra.test.compilers.support.CSpecTestPCodeEmulator
All Implemented Interfaces:
PcodeMachine<byte[]>

public class CSpecTestPCodeEmulator extends PcodeEmulator
An extension of PcodeEmulator that can load program memory and set up the emulator to run at a specific function entry point.
  • Constructor Details

    • CSpecTestPCodeEmulator

      public CSpecTestPCodeEmulator(Language lang)
    • CSpecTestPCodeEmulator

      public CSpecTestPCodeEmulator(Language lang, boolean traceDisabled, int traceLevel)
    • CSpecTestPCodeEmulator

      public CSpecTestPCodeEmulator(Language lang, boolean traceDisabled, int traceLevel, Consumer<String> logger)
  • Method Details

    • createThread

      protected BytesPcodeThread createThread(String name)
      Create BytesPcodeThread object with an overwritten 'createInstructionDecoder' method.
      Overrides:
      createThread in class PcodeEmulator
      Parameters:
      name - The name of the thread.
      Returns:
      the new thread
      See Also:
    • prepareFunction

      public PcodeThread<byte[]> prepareFunction(Function func)
      Load the function entry point context registers into emulator, create stack space, set program counter. Return a emulator thread ready for a run() call
      Parameters:
      func - The function to prepare the emulator to run.
      Returns:
      PcodeThread<byte[]>