Interface IEStateHooks
- All Superinterfaces:
IPriorityBasedHooks
- All Known Implementing Classes:
AndroidEmulationHooksSkeleton
Memory hooks.
-
Method Summary
Modifier and TypeMethodDescriptiondefault LongonAllocMemory(EState state, long address, int size, int protection) Invoked before a memory-alloc operation.default LongonAllocMemoryPost(EState state, long address, int size, int protection) Invoked after a memory-alloc operation.default BooleanonFreeMemory(EState state, long address, int size) Invoked before a memory-free operation.default IntegeronReadMemory(EState state, long address, byte[] buffer) Invoked before a memory-read operation.default IntegeronReadMemoryPost(EState state, long address, byte[] buffer, int retcode) Invoked after a memory-read operation.default BooleanonWriteMemory(EState state, long address, byte[] buffer) Invoked before a memory write.Methods inherited from interface com.pnfsoftware.jeb.core.units.IPriorityBasedHooks
getPriority
-
Method Details
-
onReadMemory
Invoked before a memory-read operation.- Parameters:
state- the stateaddress- memory addressbuffer- output buffer (contents may be written by the hook; make sure to return a non-null code if so)- Returns:
- null to process with the read; else, a read operation return code (one of:
EState.MEMREAD_OK,EState.MEMREAD_FAILED,EState.MEMREAD_BADDATA)
-
onReadMemoryPost
Invoked after a memory-read operation.- Parameters:
state- the stateaddress- memory addressbuffer- read bytes (may be modified by the hook)retcode- the return code provided by the read operation (one of:EState.MEMREAD_OK,EState.MEMREAD_FAILED,EState.MEMREAD_BADDATA)- Returns:
- null or a a read operation return code override (one of:
EState.MEMREAD_OK,EState.MEMREAD_FAILED,EState.MEMREAD_BADDATA)
-
onWriteMemory
Invoked before a memory write.- Parameters:
state- the stateaddress- memory addressbuffer- bytes to be written (may be modified by the hook)- Returns:
- null to let the write operation proceed; else, a success code
-
onAllocMemory
Invoked before a memory-alloc operation.- Parameters:
state-address- requested addresssize- requested size (may be adjusted)protection-- Returns:
- null to let the operation proceed; else, a memory address (the result of the allocation operation)
-
onAllocMemoryPost
Invoked after a memory-alloc operation.- Parameters:
state-address- the allocated addresssize- the adjusted allocated sizeprotection-- Returns:
- null to let the operation proceed; else, a memory address (the result of the allocation operation)
-
onFreeMemory
Invoked before a memory-free operation.- Parameters:
state-address- the allocated addresssize- the amount of bytes to be freed- Returns:
- null to let the operation proceed; else, a success indicator
-