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.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PCodeTestAbstractControlBlock.FunctionInfo
-
Field Summary
Fields Modifier and Type Field Description protected AddressSpace
codeSpace
protected AddressSpace
dataSpace
protected Structure
infoProgramStruct
protected Address
infoStructAddr
protected int
pointerSize
protected Program
program
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyU4Data(Address addr)
protected long
emuRead(EmulatorHelper emu, Address addr, int size)
protected java.lang.String
emuReadString(EmulatorHelper emu, Address strPtrAddr)
protected void
emuWrite(EmulatorHelper emu, Address addr, int size, long value)
PCodeTestAbstractControlBlock.FunctionInfo
getFunctionInfo(int functionIndex)
PCodeTestAbstractControlBlock.FunctionInfo
getFunctionInfo(java.lang.String functionName)
Address
getInfoStructureAddress()
protected Address
getMirroredDataAddress(EmulatorTestRunner emuTestRunner, Address addr)
int
getNumberFunctions()
protected int
getStructureComponent(Structure testInfoStruct, java.lang.String fieldName)
protected Address
readCodePointer(MemBuffer buffer, int bufferOffset, boolean updateReference)
protected void
readControlBlock(boolean applyStruct)
protected Address
readDataPointer(MemBuffer buffer, int bufferOffset, boolean updateReference)
protected Address
readDefinedDataPointer(Address addr)
Check for a Data pointer at the specified address and return the referenced address.protected Address
readPointer(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.InvalidControlBlockException
CodeUnitInsertionException
-
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)
-
-