Module openj9.dtfj
Interface Emulator.ImageSpace
-
- All Known Implementing Classes:
MutableAddressSpace
- Enclosing interface:
- Emulator
public static interface Emulator.ImageSpaceThis interface represents a mutable address space. It is used by theEmulatorto read and write values. It is similar to ImageOutputStreamImpl except that it adds the ability to allocate an area of memory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanis64bit()Return true if this dump is from a 64-bit machinelongmalloc(int size)Allocate a chunk of unused memory.intreadInt(long address)Read an int at the specified address.longreadLong(long address)Read a long at the specified address.shortreadShort(long address)Read a short at the specified address.intreadUnsignedByte(long address)Read a byte at the specified address.longreadUnsignedInt(long address)Read an unsigned int at the specified address.intreadUnsignedShort(long address)Read an unsigned short at the specified address.voidwriteByte(long address, int value)Write a byte at the specified address.voidwriteInt(long address, int value)Write an int at the specified address.voidwriteLong(long address, long value)Write a long at the specified address.voidwriteShort(long address, int value)Write a short at the specified address.
-
-
-
Method Detail
-
readUnsignedByte
int readUnsignedByte(long address) throws IOExceptionRead a byte at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
readUnsignedShort
int readUnsignedShort(long address) throws IOExceptionRead an unsigned short at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
readShort
short readShort(long address) throws IOExceptionRead a short at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
readInt
int readInt(long address) throws IOExceptionRead an int at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
readUnsignedInt
long readUnsignedInt(long address) throws IOExceptionRead an unsigned int at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
readLong
long readLong(long address) throws IOExceptionRead a long at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
writeByte
void writeByte(long address, int value) throws IOExceptionWrite a byte at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
writeShort
void writeShort(long address, int value) throws IOExceptionWrite a short at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
writeInt
void writeInt(long address, int value) throws IOExceptionWrite an int at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
writeLong
void writeLong(long address, long value) throws IOExceptionWrite a long at the specified address.- Throws:
IOException- if the given address is not present in this address space
-
malloc
long malloc(int size) throws IOExceptionAllocate a chunk of unused memory. This searches the known address ranges and tries to find an unallocated area of the given size. If successful, this area effectively becomes part of this ImageSpace and may be read and written to as normal. This method is used by users of the Emulator for things like allocating stack, arguments etc.- Returns:
- the address of the allocated memory
- Throws:
IOException
-
is64bit
boolean is64bit()
Return true if this dump is from a 64-bit machine
-
-