public interface

IEStateHooks

implements IPriorityBasedHooks
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStateHooks

Class Overview

Memory hooks.

Summary

Public Methods
abstract Integer onReadMemory(EState state, long address, byte[] buffer)
Invoked before a memory-read operation.
abstract Integer onReadMemoryPost(EState state, long address, byte[] buffer, int retcode)
Invoked after a memory-read operation.
abstract Boolean onWriteMemory(EState state, long address, byte[] buffer)
Invoked before a memory write.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.IPriorityBasedHooks

Public Methods

public abstract Integer onReadMemory (EState state, long address, byte[] buffer)

Invoked before a memory-read operation.

Parameters
state the state
address memory address
buffer 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: #MEMREAD_OK, #MEMREAD_FAILED, #MEMREAD_BADDATA)

public abstract Integer onReadMemoryPost (EState state, long address, byte[] buffer, int retcode)

Invoked after a memory-read operation.

Parameters
state the state
address memory address
buffer read bytes (may be modified by the hook)
retcode the return code provided by the read operation (one of: #MEMREAD_OK, #MEMREAD_FAILED, #MEMREAD_BADDATA)
Returns
  • null or a a read operation return code override (one of: #MEMREAD_OK, #MEMREAD_FAILED, #MEMREAD_BADDATA)

public abstract Boolean onWriteMemory (EState state, long address, byte[] buffer)

Invoked before a memory write.

Parameters
state the state
address memory address
buffer bytes to be written (may be modified by the hook)
Returns
  • null to let the write operation proceed; else, a success code