Interface IVirtualMemoryShim
- All Superinterfaces:
IVirtualMemory
A
shim
is a VM object wrapping another virtual memory, in order to allow temporary write
modifications.-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.asm.memory.IVirtualMemory
ACCESS_EXECUTE, ACCESS_NONE, ACCESS_READ, ACCESS_RW, ACCESS_RWX, ACCESS_RX, ACCESS_WRITE
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
Commit the modifications onto the underlying VM.int
commitChanges
(boolean allowPageReplacement, boolean allowPageCreation, boolean allowPageRemoval) Commit the modifications onto the underlying VM.Make a deep copy of this virtual memory.duplicate
(boolean fullDuplication) Duplicate with options.default MemoryChanges
Collect the changes made between the original memory and the current shim state.getChanges
(boolean collectWrittenPages, boolean collectCreatedPages) Collect the changes made between the original memory and the current shim state.Retrieve the underlying VM wrapped by the shim.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.memory.IVirtualMemory
addAllocListener, addFreeListener, addPreWriteListener, addPropertyListener, addProtectionListener, addWriteListener, allocate, allocatePage, check, free, freePage, getAllocatedPageBases, getAllocatedPageCount, getAproximateFootprint, getPageBits, getPageProtection, getPageSize, getSpaceBits, getStandardEndianess, isAllocatedPage, isValidAddress, read, read, readBEInt, readBELong, readBEShort, readByte, readInt, readInt, readLEInt, readLELong, readLEShort, readLong, readLong, readPointer, readShort, readShort, removeAllocListener, removeFreeListener, removePreWriteListener, removePropertyListener, removeProtectionListener, removeWriteListener, roundToPage, roundToSize, setLazyMemoryProvider, setPageProtection, setStandardEndianness, write, write, writeBEInt, writeBELong, writeBEShort, writeByte, writeInt, writeInt, writeLEInt, writeLELong, writeLEShort, writeLong, writeLong, writePointer, writeShort, writeShort
-
Method Details
-
getUnderlyingMemory
IVirtualMemory getUnderlyingMemory()Retrieve the underlying VM wrapped by the shim.- Returns:
-
commitChanges
int commitChanges(boolean allowPageReplacement, boolean allowPageCreation, boolean allowPageRemoval) Commit the modifications onto the underlying VM. Memory writes, page allocations and deletions will be applied to the wrapped virtual memory object.- Parameters:
allowPageReplacement
-allowPageCreation
-allowPageRemoval
-- Returns:
- the numbers of pages committed
-
commitChanges
default int commitChanges()Commit the modifications onto the underlying VM. Memory writes, page allocations and deletions will be applied to the wrapped virtual memory object.- Returns:
- the numbers of pages committed
-
getChanges
Collect the changes made between the original memory and the current shim state.- Parameters:
collectWrittenPages
- true to collect pages that already existed and were modifiedcollectCreatedPages
- true to collect pages that did not exist and were created- Returns:
- a diff
-
getChanges
Collect the changes made between the original memory and the current shim state.- Returns:
- a diff
-
duplicate
IVirtualMemoryShim duplicate()Description copied from interface:IVirtualMemory
Make a deep copy of this virtual memory.Implementation note: the resulting object may not be of the same type as the source (this) object.
- Specified by:
duplicate
in interfaceIVirtualMemory
- Returns:
- a new memory object
-
duplicate
Duplicate with options.- Parameters:
fullDuplication
- if false, duplicate the shim only (same asduplicate()
); else, a full non-shim VM is created, no longer dependent on some underlying VM- Returns:
- a duplicated VM
-