Class PCodeTestAbstractControlBlock

java.lang.Object
ghidra.test.processors.support.PCodeTestAbstractControlBlock
Direct Known Subclasses:
PCodeTestControlBlock, PCodeTestGroupControlBlock

public abstract class PCodeTestAbstractControlBlock extends Object
PCodeTestAbstractControlBlock data is models the general capabilities of the TestInfo data structure which is used for different puposes as handled by extensions of this class.
  • Field Details

    • program

      protected final Program program
    • codeSpace

      protected final AddressSpace codeSpace
    • dataSpace

      protected final AddressSpace dataSpace
    • pointerSize

      protected final int pointerSize
    • infoStructAddr

      protected final Address infoStructAddr
    • infoProgramStruct

      protected final Structure infoProgramStruct
  • Method Details

    • getInfoStructureAddress

      public Address getInfoStructureAddress()
    • getFunctionInfo

      public PCodeTestAbstractControlBlock.FunctionInfo getFunctionInfo(String functionName)
    • getFunctionInfo

      public PCodeTestAbstractControlBlock.FunctionInfo getFunctionInfo(int functionIndex)
    • getNumberFunctions

      public int getNumberFunctions()
    • readDefinedDataPointer

      protected Address readDefinedDataPointer(Address addr)
      Check for a Data pointer at the specified address and return the referenced address.
      Parameters:
      addr - address of stored pointer
      Returns:
      pointer referenced address or null if no pointer found
    • readCodePointer

      protected Address readCodePointer(MemBuffer buffer, int bufferOffset, boolean updateReference) throws MemoryAccessException
      Throws:
      MemoryAccessException
    • readDataPointer

      protected Address readDataPointer(MemBuffer buffer, int bufferOffset, boolean updateReference)
    • readPointer

      protected Address readPointer(int controlBlockOffset) throws MemoryAccessException
      Throws:
      MemoryAccessException
    • applyU4Data

      protected void applyU4Data(Address addr)
    • getStructureComponent

      protected int getStructureComponent(Structure testInfoStruct, String fieldName)
    • readControlBlock

      protected void readControlBlock(boolean applyStruct) throws ghidra.test.processors.support.PCodeTestAbstractControlBlock.InvalidControlBlockException, CodeUnitInsertionException
      Throws:
      ghidra.test.processors.support.PCodeTestAbstractControlBlock.InvalidControlBlockException
      CodeUnitInsertionException
    • emuReadString

      protected String emuReadString(ghidra.app.emulator.EmulatorHelper emu, Address strPtrAddr)
    • emuRead

      protected long emuRead(ghidra.app.emulator.EmulatorHelper emu, Address addr, int size)
    • emuWrite

      protected void emuWrite(ghidra.app.emulator.EmulatorHelper emu, Address addr, int size, long value)
    • getMirroredDataAddress

      protected Address getMirroredDataAddress(EmulatorTestRunner emuTestRunner, Address addr)