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 TypeMethodDescriptionbooleancommit()Commit the changes to memory.booleanSet a field in the structure, if the provided type was a structure.voidsetByteAt(int off, byte val) voidsetDoubleAt(int off, double val) voidsetFloatAt(int off, float val) voidsetIntAt(int off, int val) voidsetLongAt(int off, long val) voidsetShortAt(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)
-