java.lang.Object
com.ibm.dtfj.addressspace.CommonAddressSpace
- All Implemented Interfaces:
IAbstractAddressSpace
- Direct Known Subclasses:
DumpReaderAddressSpace,LayeredAddressSpace,SimpleAddressSpace
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCommonAddressSpace(MemoryRange[] translations, boolean isLittleEndian, boolean is64Bit) -
Method Summary
Modifier and TypeMethodDescriptionprotected MemoryRange_residentRange(int asid, long address) intbytesPerPointer(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 intcompareAddress(int lasid, long lhs, int rasid, long rhs) longfindPattern(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 intfindWhichMemoryRange(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......bytegetByteAt(int asid, long address) Return the byte order of this address space.intgetIntAt(int asid, long address) longgetLongAt(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.longgetPointerAt(int asid, long address) shortgetShortAt(int asid, long address) Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface com.ibm.dtfj.addressspace.IAbstractAddressSpace
getBytesAt, isExecutable, isReadOnly, isShared
-
Constructor Details
-
CommonAddressSpace
-
-
Method Details
-
getMemoryRanges
- Specified by:
getMemoryRangesin 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:IAbstractAddressSpaceReturn the byte order of this address space.- Specified by:
getByteOrderin interfaceIAbstractAddressSpace- Returns:
- the byte order of this address space
-
getMemoryBytes
public byte[] getMemoryBytes(long vaddr, int size) Description copied from interface:IAbstractAddressSpaceThis method is provided to appease JExtract by emulating part of the old API which is used by the JExtract natives.- Specified by:
getMemoryBytesin 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:IAbstractAddressSpaceThis 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:
findPatternin 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:
getLongAtin 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:
getIntAtin 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:
getShortAtin 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:
getByteAtin 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:
getPointerAtin 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:IAbstractAddressSpaceProvided so that callers can determine more complicated memory geometry than what can be expressed with offsets and the above scalar data readers.- Specified by:
bytesPerPointerin 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.
-