- java.lang.Object
-
- com.ibm.j9ddr.vm29.j9.DataType
-
- com.ibm.j9ddr.vm29.pointer.AbstractPointer
-
- Direct Known Subclasses:
CorruptPointer,Pointer,StructurePointer
public abstract class AbstractPointer extends DataType
-
-
Field Summary
Fields Modifier and Type Field Description protected longaddress-
Fields declared in class com.ibm.j9ddr.vm29.j9.DataType
BITFIELD_FORMAT, pointerPackageName, process, SIZEOF_BOOL, structurePackageName
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPointer(long address)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AbstractPointeradd(long count)abstract AbstractPointeradd(Scalar count)abstract AbstractPointeraddOffset(long offset)abstract AbstractPointeraddOffset(Scalar offset)booleanallBitsIn(long bitmask)booleananyBitsIn(long bitmask)abstract DataTypeat(long index)abstract DataTypeat(Scalar index)intcompare(AbstractPointer pointer)booleaneq(Object obj)StringformatFullInteractive()longgetAddress()protected static IProcessgetAddressSpace()protected chargetBaseCharAtOffset(long offset)protected booleangetBoolAtOffset(long offset)protected bytegetByteAtOffset(long offset)intgetBytesAtOffset(long offset, byte[] data)protected doublegetDoubleAtOffset(long offset)protected floatgetFloatAtOffset(long offset)StringgetHexAddress()StringgetHexValue()This method reads number of the bytes depending on the pointers' base size.protected IDATAgetIDATAAtOffset(long offset)protected intgetIntAtOffset(long offset)protected longgetLongAtOffset(long offset)protected com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointergetObjectClassAtOffset(long offset)protected com.ibm.j9ddr.vm29.pointer.generated.J9ObjectMonitorPointergetObjectMonitorAtOffset(long offset)protected com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointergetObjectReferenceAtOffset(long offset)protected longgetPointerAtOffset(long offset)protected shortgetShortAtOffset(long offset)StringgetTargetName()protected UDATAgetUDATAAtOffset(long offset)booleangt(AbstractPointer pointer)booleangte(AbstractPointer pointer)StringhexAt(long index)This method returns the memory values at the given index.StringhexAt(Scalar index)This method returns the memory values at the given index.booleanisNull()booleanlt(AbstractPointer pointer)booleanlte(AbstractPointer pointer)longnonNullAddress()booleannotNull()static voidreportClassCacheStats()protected abstract longsizeOfBaseType()abstract AbstractPointersub(long count)IDATAsub(AbstractPointer pointer)abstract AbstractPointersub(Scalar count)abstract AbstractPointersubOffset(long offset)abstract AbstractPointersubOffset(Scalar offset)abstract AbstractPointeruntag()abstract AbstractPointeruntag(long tagBits)-
Methods declared in class com.ibm.j9ddr.vm29.j9.DataType
formatShortInteractive, getJ9RASPointer, getPointerPackageName, getProcess, getStructure, getStructure, getStructure, getStructurePackageName, init, longValue, setJ9RASPointer
-
-
-
-
Method Detail
-
add
public abstract AbstractPointer add(long count)
-
add
public abstract AbstractPointer add(Scalar count)
-
addOffset
public abstract AbstractPointer addOffset(long offset)
-
addOffset
public abstract AbstractPointer addOffset(Scalar offset)
-
sub
public abstract AbstractPointer sub(long count)
-
sub
public abstract AbstractPointer sub(Scalar count)
-
subOffset
public abstract AbstractPointer subOffset(long offset)
-
subOffset
public abstract AbstractPointer subOffset(Scalar offset)
-
untag
public abstract AbstractPointer untag(long tagBits)
-
untag
public abstract AbstractPointer untag()
-
allBitsIn
public final boolean allBitsIn(long bitmask)
-
anyBitsIn
public boolean anyBitsIn(long bitmask)
-
at
public abstract DataType at(long index) throws CorruptDataException
- Throws:
CorruptDataException
-
at
public abstract DataType at(Scalar index) throws CorruptDataException
- Throws:
CorruptDataException
-
isNull
public boolean isNull()
-
notNull
public boolean notNull()
-
eq
public boolean eq(Object obj)
-
getAddress
public long getAddress()
-
nonNullAddress
public final long nonNullAddress() throws NullPointerDereference- Throws:
NullPointerDereference
-
getHexAddress
public String getHexAddress()
-
hexAt
public String hexAt(long index) throws CorruptDataException
This method returns the memory values at the given index. For StructurePointer instance objects, UDATA.sizeof amount of bytes are read. Otherwise, amount of bytes to be read depend on the object type. For instance, if it is I16Pointer, then 2 bytes are read. Note that this method returns bytes as they appear in the memory. It ignores endian-ization. For instance I16 value 0xABCD lays in the memory as CDAB on Little Endian platforms. And this method returns for this I16Pointer 0xCDAB and does not reverse the bytes.- Parameters:
index- Offset of the memory to be read.- Returns:
- String representation of the value at the given index.
- Throws:
CorruptDataException
-
hexAt
public String hexAt(Scalar index) throws CorruptDataException
This method returns the memory values at the given index. For StructurePointer instance objects, UDATA.sizeof amount of bytes are read. Otherwise, amount of bytes to be read depend on the object type. For instance, if it is I16Pointer, then 2 bytes are read. Note that this method returns bytes as they appear in the memory. It ignores endian-ization. For instance I16 value 0xABCD lays in the memory as CDAB on Little Endian platforms. And this method returns for this I16Pointer 0xCDAB and does not reverse the bytes.- Parameters:
index- Offset of the memory to be read.- Returns:
- String representation of the value at the given index.
- Throws:
CorruptDataException
-
getHexValue
public String getHexValue() throws CorruptDataException
This method reads number of the bytes depending on the pointers' base size. And if the platform is little endian, it reverses the bytes read and returns it as hex string. If the platform is big endian, then it returns the read bytes as it is as an hex string.- Returns:
- hex string of the value of this pointer points.
- Throws:
CorruptDataException
-
getAddressSpace
protected static IProcess getAddressSpace()
-
lt
public boolean lt(AbstractPointer pointer)
-
lte
public boolean lte(AbstractPointer pointer)
-
gt
public boolean gt(AbstractPointer pointer)
-
gte
public boolean gte(AbstractPointer pointer)
-
sub
public IDATA sub(AbstractPointer pointer)
-
sizeOfBaseType
protected abstract long sizeOfBaseType()
-
compare
public int compare(AbstractPointer pointer)
-
getPointerAtOffset
protected long getPointerAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getIntAtOffset
protected int getIntAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getDoubleAtOffset
protected double getDoubleAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getFloatAtOffset
protected float getFloatAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getBoolAtOffset
protected boolean getBoolAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getUDATAAtOffset
protected UDATA getUDATAAtOffset(long offset) throws CorruptDataException
- Throws:
CorruptDataException
-
getIDATAAtOffset
protected IDATA getIDATAAtOffset(long offset) throws CorruptDataException
- Throws:
CorruptDataException
-
getShortAtOffset
protected short getShortAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getByteAtOffset
protected byte getByteAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getBytesAtOffset
public int getBytesAtOffset(long offset, byte[] data) throws CorruptDataException- Throws:
CorruptDataException
-
getBaseCharAtOffset
protected char getBaseCharAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getLongAtOffset
protected long getLongAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getObjectReferenceAtOffset
protected com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer getObjectReferenceAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getObjectClassAtOffset
protected com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer getObjectClassAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
getObjectMonitorAtOffset
protected com.ibm.j9ddr.vm29.pointer.generated.J9ObjectMonitorPointer getObjectMonitorAtOffset(long offset) throws CorruptDataException- Throws:
CorruptDataException
-
formatFullInteractive
public String formatFullInteractive()
- Returns:
- Full DDR-interactive formatting
-
getTargetName
public String getTargetName()
-
reportClassCacheStats
public static void reportClassCacheStats()
-
-