java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.memory.VMWriter

public class VMWriter extends Object
Virtual memory utility (outside of VirtualMemoryUtil) to write memory bytes mapping to native data types.
  • Constructor Details

    • VMWriter

      public VMWriter(IVirtualMemory vm, long addr, INativeType t)
      Create a writer for the provided.
      Parameters:
      vm - a virtual memory object
      addr - address in memory
      t - a native type
  • Method Details

    • commit

      public boolean commit()
      Commit the changes to memory.
      Returns:
      true if the memory was updated
    • set

      public boolean set(String fieldName, Object fieldValue)
      Set a field in the structure, if the provided type was a structure.
      Parameters:
      fieldName - field name
      fieldValue - field value
      Returns:
      true if the field was set
    • setByteAt

      public void setByteAt(int off, byte val)
      Set a byte at an offset.
      Parameters:
      off - offset
      val - byte value
    • setShortAt

      public void setShortAt(int off, short val)
      Set a short at an offset.
      Parameters:
      off - offset
      val - short value
    • setIntAt

      public void setIntAt(int off, int val)
      Set an int at an offset.
      Parameters:
      off - offset
      val - int value
    • setLongAt

      public void setLongAt(int off, long val)
      Set a long at an offset.
      Parameters:
      off - offset
      val - long value
    • setFloatAt

      public void setFloatAt(int off, float val)
      Set a float at an offset.
      Parameters:
      off - offset
      val - float value
    • setDoubleAt

      public void setDoubleAt(int off, double val)
      Set a double at an offset.
      Parameters:
      off - offset
      val - double value