public interface

IVirtualMemoryShim

implements IVirtualMemory
com.pnfsoftware.jeb.core.units.code.asm.memory.IVirtualMemoryShim

Class Overview

A shim is a VM object wrapping another virtual memory, in order to allow temporary write modifications.

Summary

[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.asm.memory.IVirtualMemory
Public Methods
abstract int commitChanges(boolean allowPageReplacement, boolean allowPageCreation, boolean allowPageRemoval)
Commit the modifications onto the underlying VM.
abstract int commitChanges()
Commit the modifications onto the underlying VM.
abstract IVirtualMemoryShim duplicate()
Make a deep copy of this virtual memory.
abstract IVirtualMemory duplicate(boolean fullDuplication)
Duplicate with options.
abstract MemoryChanges getChanges(boolean collectWrittenPages, boolean collectCreatedPages)
Collect the changes made between the original memory and the current shim state.
abstract MemoryChanges getChanges()
Collect the changes made between the original memory and the current shim state.
abstract IVirtualMemory getUnderlyingMemory()
Retrieve the underlying VM wrapped by the shim.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.asm.memory.IVirtualMemory

Public Methods

public abstract 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.

Returns
  • the numbers of pages committed

public abstract 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

public abstract IVirtualMemoryShim duplicate ()

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.

Returns
  • a new memory object

public abstract IVirtualMemory duplicate (boolean fullDuplication)

Duplicate with options.

Parameters
fullDuplication if false, duplicate the shim only (same as duplicate()); else, a full non-shim VM is created, no longer dependent on some underlying VM
Returns
  • a duplicated VM

public abstract MemoryChanges getChanges (boolean collectWrittenPages, boolean collectCreatedPages)

Collect the changes made between the original memory and the current shim state.

Parameters
collectWrittenPages true to collect pages that already existed and were modified
collectCreatedPages true to collect pages that did not exist and were created
Returns
  • a diff

public abstract MemoryChanges getChanges ()

Collect the changes made between the original memory and the current shim state.

Returns
  • a diff

public abstract IVirtualMemory getUnderlyingMemory ()

Retrieve the underlying VM wrapped by the shim.