Class EmulatorTestRunner

java.lang.Object
ghidra.test.processors.support.EmulatorTestRunner

public class EmulatorTestRunner extends Object
  • Constructor Details Link icon

  • Method Details Link icon

    • dispose Link icon

      public void dispose()
    • getTestGroup Link icon

      public PCodeTestGroup getTestGroup()
    • getProgram Link icon

      public Program getProgram()
    • getEmulatorHelper Link icon

      public EmulatorHelper getEmulatorHelper()
    • setContextRegister Link icon

      public void setContextRegister(RegisterValue ctxRegValue)
    • getCurrentAddress Link icon

      public Address getCurrentAddress()
    • getCurrentInstruction Link icon

      public Instruction getCurrentInstruction()
    • getRegisterValue Link icon

      public RegisterValue getRegisterValue(Register reg)
    • getRegisterValueString Link icon

      public String getRegisterValueString(Register reg)
    • setRegister Link icon

      public void setRegister(String regName, long value)
    • setRegister Link icon

      public void setRegister(String regName, BigInteger value)
    • addDumpPoint Link icon

      public void addDumpPoint(Address breakAddr, Address dumpAddr, int dumpSize, int elementSize, EmulatorTestRunner.DumpFormat elementFormat, String comment)
      Add memory dump point
      Parameters:
      breakAddr - instruction address at which execution should pause (before it is executed) so that the specified memory may be dumped to the log during trace execution mode.
      dumpAddr - memory address which should be dumped
      dumpSize - number elements which should be dumped
      elementSize - size of each element in bytes (be reasonable!)
      elementFormat - HEX, DECIMAL or FLOAT
      comment - dump comment
    • addDumpPoint Link icon

      public void addDumpPoint(Address breakAddr, Register dumpAddrReg, int relativeOffset, AddressSpace dumpAddrSpace, int dumpSize, int elementSize, EmulatorTestRunner.DumpFormat elementFormat, String comment)
      Add memory dump point
      Parameters:
      breakAddr - instruction address at which execution should pause (before it is executed) so that the specified memory may be dumped to the log during trace execution mode.
      dumpAddrReg - register containing the memory address offset which should be dumped
      relativeOffset - dump register relative offset
      dumpAddrSpace - address space to which memory offset should be applied
      dumpSize - number elements which should be dumped
      elementSize - size of each element in bytes (be reasonable!)
      elementFormat - HEX, DECIMAL or FLOAT
      comment - dump comment
    • getEmuError Link icon

      public String getEmuError()
    • getCallOtherErrors Link icon

      public int getCallOtherErrors()
      Get number of CALLOTHER errors detected when a test pass was registered. This number should be subtracted from the pass count and possibly added to the failure count. Number does not reflect total number of CALLOTHER pcodeops encountered but only the number of passed tests affected. See log for all CALLOTHER executions detected.
      Returns:
      number of CALLOTHER errors
    • execute Link icon

      public boolean execute(int timeLimitMS, TaskMonitor monitor) throws CancelledException
      Execute test group without instruction stepping/tracing
      Parameters:
      timeLimitMS -
      monitor -
      Returns:
      Throws:
      CancelledException
    • executeSingleStep Link icon

      public boolean executeSingleStep(int stepLimit)