Class CommonAddressSpace
java.lang.Object
com.ibm.dtfj.addressspace.CommonAddressSpace
- All Implemented Interfaces:
IAbstractAddressSpace
- Direct Known Subclasses:
DumpReaderAddressSpace
,LayeredAddressSpace
,SimpleAddressSpace
-
Constructor Summary
ModifierConstructorDescriptionprotected
CommonAddressSpace
(MemoryRange[] translations, boolean isLittleEndian, boolean is64Bit) -
Method Summary
Modifier and TypeMethodDescriptionprotected MemoryRange
_residentRange
(int asid, long address) 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.protected static int
compareAddress
(int lasid, long lhs, int rasid, long rhs) 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.protected static int
findWhichMemoryRange
(int asid, long addr, MemoryRange[] ranges, Integer lastRange, boolean doLinearIfNotFound) This searches memory ranges for an addr using a binary chop and returns an int indicating the memory range or -1 if address is not within any memory range......byte
getByteAt
(int asid, long address) Return the byte order of this address space.int
getIntAt
(int asid, long address) long
getLongAt
(int asid, long address) byte[]
getMemoryBytes
(int asid, long vaddr, int size) 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) Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods declared in interface com.ibm.dtfj.addressspace.IAbstractAddressSpace
getBytesAt, isExecutable, isReadOnly, isShared
-
Constructor Details
-
CommonAddressSpace
-
-
Method Details
-
getMemoryRanges
- Specified by:
getMemoryRanges
in interfaceIAbstractAddressSpace
- Returns:
- An iterator of the MemoryRange objects making up the address space
- See Also:
-
_residentRange
- Throws:
MemoryAccessException
-
findWhichMemoryRange
protected static int findWhichMemoryRange(int asid, long addr, MemoryRange[] ranges, Integer lastRange, boolean doLinearIfNotFound) This searches memory ranges for an addr using a binary chop and returns an int indicating the memory range or -1 if address is not within any memory range......- Parameters:
asid
- TODO
-
compareAddress
protected static int compareAddress(int lasid, long lhs, int rasid, long rhs) -
getByteOrder
Description copied from interface:IAbstractAddressSpace
Return the byte order of this address space.- Specified by:
getByteOrder
in interfaceIAbstractAddressSpace
- Returns:
- the byte order of this address space
-
getMemoryBytes
public byte[] getMemoryBytes(long vaddr, int size) Description copied from interface:IAbstractAddressSpace
This method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives.- Specified by:
getMemoryBytes
in interfaceIAbstractAddressSpace
- Parameters:
vaddr
-size
-- Returns:
-
getMemoryBytes
public byte[] getMemoryBytes(int asid, long vaddr, int size) -
findPattern
public long findPattern(byte[] whatBytes, int alignment, long startFrom) Description copied from interface:IAbstractAddressSpace
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- Specified by:
findPattern
in interfaceIAbstractAddressSpace
- 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:
-
getLongAt
- Specified by:
getLongAt
in interfaceIAbstractAddressSpace
- 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
- Specified by:
getIntAt
in interfaceIAbstractAddressSpace
- 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
- Specified by:
getShortAt
in interfaceIAbstractAddressSpace
- 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
-
getByteAt
- Specified by:
getByteAt
in interfaceIAbstractAddressSpace
- 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
- Specified by:
getPointerAt
in interfaceIAbstractAddressSpace
- 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
-
bytesPerPointer
public int bytesPerPointer(int asid) Description copied from interface:IAbstractAddressSpace
Provided so that callers can determine more complicated memory geometry than what can be expressed with offsets and the above scalar data readers.- Specified by:
bytesPerPointer
in interfaceIAbstractAddressSpace
- Parameters:
asid
- The address space id.- Returns:
- The number of bytes which are required to express a native pointer in the underlying address space.
-