Interface IAbstractAddressSpace
- All Known Implementing Classes:
CommonAddressSpace
,DumpReaderAddressSpace
,LayeredAddressSpace
,SimpleAddressSpace
public interface IAbstractAddressSpace
-
Method Summary
Modifier and TypeMethodDescriptionint
bytesPerPointer
(int asid) Provided so that callers can determine more complicated memory geometry than what can be expressed with offsets and the above scalar data readers.long
findPattern
(byte[] whatBytes, int alignment, long startFrom) This method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives.byte
getByteAt
(int asid, long address) Return the byte order of this address space.int
getBytesAt
(int asid, long address, byte[] buffer) int
getIntAt
(int asid, long address) long
getLongAt
(int asid, long address) byte[]
getMemoryBytes
(long vaddr, int size) This method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives.long
getPointerAt
(int asid, long address) short
getShortAt
(int asid, long address) boolean
isExecutable
(int asid, long address) boolean
isReadOnly
(int asid, long address) boolean
isShared
(int asid, long address)
-
Method Details
-
getMemoryRanges
Iterator getMemoryRanges()- Returns:
- An iterator of the MemoryRange objects making up the address space
- See Also:
-
isExecutable
- Parameters:
asid
- an address space IDaddress
- a byte-offset into the asid- Returns:
- true if this memory address is within an executable page
- Throws:
MemoryAccessException
- if the memory cannot be read
-
isReadOnly
- Parameters:
asid
- an address space IDaddress
- a byte-offset into the asid- Returns:
- true if write access to this memory address was disabled in the image
- Throws:
MemoryAccessException
- if the memory cannot be read
-
getLongAt
- Parameters:
asid
- an address space IDaddress
- a byte-offset into the asid- Returns:
- the 64-bit long stored at address in asid
- Throws:
MemoryAccessException
- if the memory cannot be read
-
getIntAt
- Parameters:
asid
- an address space IDaddress
- a byte-offset into the asid- Returns:
- the 32-bit int stored at address in asid
- Throws:
MemoryAccessException
- if the memory cannot be read
-
getShortAt
- Parameters:
asid
- an address space IDaddress
- a byte-offset into the asid- Returns:
- the 16-bit short stored at address in asid
- Throws:
MemoryAccessException
- if the memory cannot be read
-
getByteOrder
ByteOrder getByteOrder()Return the byte order of this address space.- Returns:
- the byte order of this address space
-
getByteAt
- Parameters:
asid
- an address space IDaddress
- a byte-offset into the asid- Returns:
- the 8-bit byte stored at address in asid
- Throws:
MemoryAccessException
- if the memory cannot be read
-
getPointerAt
- Parameters:
asid
- an address space IDaddress
- a byte-offset into the asid- Returns:
- the pointer stored at address in asid
- Throws:
MemoryAccessException
- if the memory cannot be read
-
getBytesAt
- Parameters:
asid
- an address space IDaddress
- a byte-offset into the asidbuffer
- a byte array to receive the bytes- Returns:
- the number of bytes read into buffer
- Throws:
MemoryAccessException
- if the memory cannot be read
-
bytesPerPointer
int bytesPerPointer(int asid) Provided so that callers can determine more complicated memory geometry than what can be expressed with offsets and the above scalar data readers.- Parameters:
asid
- The address space id.- Returns:
- The number of bytes which are required to express a native pointer in the underlying address space.
-
findPattern
long findPattern(byte[] whatBytes, int alignment, long startFrom) This method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives. Also used to search for the J9RAS structure in J9RASReader.java- Parameters:
whatBytes
- The pattern to search foralignment
- The alignment boundary where the pattern can be expected to startstartFrom
- The first memory address to start searching in- Returns:
-
getMemoryBytes
byte[] getMemoryBytes(long vaddr, int size) This method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives.- Parameters:
vaddr
-size
-- Returns:
-