Class VMWriter
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.memory.VMWriter
Virtual memory utility (outside of
VirtualMemoryUtil
) to write memory bytes mapping to
native data types
.-
Constructor Summary
ConstructorsConstructorDescriptionVMWriter
(IVirtualMemory vm, long addr, INativeType t) Create a writer for the provided. -
Method Summary
Modifier and TypeMethodDescriptionboolean
commit()
Commit the changes to memory.boolean
Set a field in the structure, if the provided type was a structure.void
setByteAt
(int off, byte val) void
setDoubleAt
(int off, double val) void
setFloatAt
(int off, float val) void
setIntAt
(int off, int val) void
setLongAt
(int off, long val) void
setShortAt
(int off, short val)
-
Constructor Details
-
VMWriter
Create a writer for the provided.- Parameters:
vm
- a virtual memory objectaddr
- address in memoryt
- a native type
-
-
Method Details
-
commit
public boolean commit()Commit the changes to memory.- Returns:
- true if the memory was updated
-
set
Set a field in the structure, if the provided type was a structure.- Parameters:
fieldName
-fieldValue
-- Returns:
-
setByteAt
public void setByteAt(int off, byte val) -
setShortAt
public void setShortAt(int off, short val) -
setIntAt
public void setIntAt(int off, int val) -
setLongAt
public void setLongAt(int off, long val) -
setFloatAt
public void setFloatAt(int off, float val) -
setDoubleAt
public void setDoubleAt(int off, double val)
-