Package ghidra.test.processors.support
Class PCodeTestAbstractControlBlock
- java.lang.Object
-
- ghidra.test.processors.support.PCodeTestAbstractControlBlock
-
- Direct Known Subclasses:
PCodeTestControlBlock,PCodeTestGroupControlBlock
public abstract class PCodeTestAbstractControlBlock extends java.lang.ObjectPCodeTestAbstractControlBlockdata is models the general capabilities of the TestInfo data structure which is used for different puposes as handled by extensions of this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPCodeTestAbstractControlBlock.FunctionInfo
-
Field Summary
Fields Modifier and Type Field Description protected AddressSpacecodeSpaceprotected AddressSpacedataSpaceprotected StructureinfoProgramStructprotected AddressinfoStructAddrprotected intpointerSizeprotected Programprogram
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyU4Data(Address addr)protected longemuRead(EmulatorHelper emu, Address addr, int size)protected java.lang.StringemuReadString(EmulatorHelper emu, Address strPtrAddr)protected voidemuWrite(EmulatorHelper emu, Address addr, int size, long value)PCodeTestAbstractControlBlock.FunctionInfogetFunctionInfo(int functionIndex)PCodeTestAbstractControlBlock.FunctionInfogetFunctionInfo(java.lang.String functionName)AddressgetInfoStructureAddress()protected AddressgetMirroredDataAddress(EmulatorTestRunner emuTestRunner, Address addr)intgetNumberFunctions()protected intgetStructureComponent(Structure testInfoStruct, java.lang.String fieldName)protected AddressreadCodePointer(MemBuffer buffer, int bufferOffset, boolean updateReference)protected voidreadControlBlock(boolean applyStruct)protected AddressreadDataPointer(MemBuffer buffer, int bufferOffset, boolean updateReference)protected AddressreadDefinedDataPointer(Address addr)Check for a Data pointer at the specified address and return the referenced address.protected AddressreadPointer(int controlBlockOffset)
-
-
-
Field Detail
-
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 Detail
-
getInfoStructureAddress
public Address getInfoStructureAddress()
-
getFunctionInfo
public PCodeTestAbstractControlBlock.FunctionInfo getFunctionInfo(java.lang.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)
-
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, java.lang.String fieldName)
-
readControlBlock
protected void readControlBlock(boolean applyStruct) throws ghidra.test.processors.support.PCodeTestAbstractControlBlock.InvalidControlBlockException, CodeUnitInsertionException- Throws:
ghidra.test.processors.support.PCodeTestAbstractControlBlock.InvalidControlBlockExceptionCodeUnitInsertionException
-
emuReadString
protected java.lang.String emuReadString(EmulatorHelper emu, Address strPtrAddr)
-
emuRead
protected long emuRead(EmulatorHelper emu, Address addr, int size)
-
emuWrite
protected void emuWrite(EmulatorHelper emu, Address addr, int size, long value)
-
getMirroredDataAddress
protected Address getMirroredDataAddress(EmulatorTestRunner emuTestRunner, Address addr)
-
-