public class LinuxAddress extends java.lang.Object implements Address
Modifier and Type | Field and Description |
---|---|
protected long |
addr |
protected LinuxDebugger |
debugger |
Constructor and Description |
---|
LinuxAddress(LinuxDebugger debugger,
long addr) |
Modifier and Type | Method and Description |
---|---|
Address |
addOffsetTo(long offset)
This throws an UnsupportedOperationException if this address happens
to actually be an OopHandle, because interior object pointers
are not allowed.
|
OopHandle |
addOffsetToAsOopHandle(long offset)
This method had to be added in order to support heap iteration
in the debugging system, and is effectively the dangerous
operation of allowing interior object pointers.
|
Address |
andWithMask(long mask)
This throws an UnsupportedOperationException if this address happens
to actually be an OopHandle.
|
boolean |
equals(java.lang.Object arg)
This is stated explicitly here because it is important for
implementations to understand that equals() and hashCode() must
absolutely, positively work properly -- i.e., two Address
objects representing the same address are both equal (via
equals()) and have the same hash code.
|
Address |
getAddressAt(long offset)
This returns null if the address at the given offset is NULL.
|
long |
getCIntegerAt(long offset,
long numBytes,
boolean isUnsigned) |
Address |
getCompKlassAddressAt(long offset) |
Address |
getCompOopAddressAt(long offset)
Returns the decoded address at the given offset
|
OopHandle |
getCompOopHandleAt(long offset) |
boolean |
getJBooleanAt(long offset) |
byte |
getJByteAt(long offset) |
char |
getJCharAt(long offset) |
double |
getJDoubleAt(long offset) |
float |
getJFloatAt(long offset) |
int |
getJIntAt(long offset) |
long |
getJLongAt(long offset) |
short |
getJShortAt(long offset) |
OopHandle |
getOopHandleAt(long offset)
This returns null if the address at the given offset is NULL.
|
boolean |
greaterThan(Address a)
Performs unsigned comparison "this > arg".
|
boolean |
greaterThanOrEqual(Address a)
Performs unsigned comparison "this >= arg".
|
int |
hashCode()
This is stated explicitly here because it is important for
implementations to understand that equals() and hashCode() must
absolutely, positively work properly -- i.e., two Address
objects representing the same address are both equal (via
equals()) and have the same hash code.
|
boolean |
lessThan(Address a)
Performs unsigned comparison "this < arg".
|
boolean |
lessThanOrEqual(Address a)
Performs unsigned comparison "this <= arg".
|
static void |
main(java.lang.String[] args) |
long |
minus(Address arg)
(FIXME: any signed/unsigned issues? Should this work for
OopHandles?)
|
Address |
orWithMask(long mask)
This throws an UnsupportedOperationException if this address happens
to actually be an OopHandle.
|
void |
setAddressAt(long offset,
Address value)
Sets an Address at the specified location.
|
void |
setCIntegerAt(long offset,
long numBytes,
long value)
Sets a C integer numBytes in size at the specified offset.
|
void |
setJBooleanAt(long offset,
boolean value) |
void |
setJByteAt(long offset,
byte value) |
void |
setJCharAt(long offset,
char value) |
void |
setJDoubleAt(long offset,
double value) |
void |
setJFloatAt(long offset,
float value) |
void |
setJIntAt(long offset,
int value) |
void |
setJLongAt(long offset,
long value) |
void |
setJShortAt(long offset,
short value) |
void |
setOopHandleAt(long offset,
OopHandle value) |
java.lang.String |
toString() |
Address |
xorWithMask(long mask)
This throws an UnsupportedOperationException if this address happens
to actually be an OopHandle.
|
protected LinuxDebugger debugger
protected long addr
public LinuxAddress(LinuxDebugger debugger, long addr)
public boolean equals(java.lang.Object arg)
Address
public int hashCode()
Address
public java.lang.String toString()
toString
in class java.lang.Object
public long getCIntegerAt(long offset, long numBytes, boolean isUnsigned) throws UnalignedAddressException, UnmappedAddressException
getCIntegerAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public Address getAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException
Address
getAddressAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public Address getCompOopAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException
Address
getCompOopAddressAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public Address getCompKlassAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException
getCompKlassAddressAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public boolean getJBooleanAt(long offset) throws UnalignedAddressException, UnmappedAddressException
getJBooleanAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public byte getJByteAt(long offset) throws UnalignedAddressException, UnmappedAddressException
getJByteAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public char getJCharAt(long offset) throws UnalignedAddressException, UnmappedAddressException
getJCharAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public double getJDoubleAt(long offset) throws UnalignedAddressException, UnmappedAddressException
getJDoubleAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public float getJFloatAt(long offset) throws UnalignedAddressException, UnmappedAddressException
getJFloatAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public int getJIntAt(long offset) throws UnalignedAddressException, UnmappedAddressException
getJIntAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public long getJLongAt(long offset) throws UnalignedAddressException, UnmappedAddressException
getJLongAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public short getJShortAt(long offset) throws UnalignedAddressException, UnmappedAddressException
getJShortAt
in interface Address
UnalignedAddressException
UnmappedAddressException
public OopHandle getOopHandleAt(long offset) throws UnalignedAddressException, UnmappedAddressException, NotInHeapException
Address
getOopHandleAt
in interface Address
UnalignedAddressException
UnmappedAddressException
NotInHeapException
public OopHandle getCompOopHandleAt(long offset) throws UnalignedAddressException, UnmappedAddressException, NotInHeapException
getCompOopHandleAt
in interface Address
UnalignedAddressException
UnmappedAddressException
NotInHeapException
public void setCIntegerAt(long offset, long numBytes, long value)
Address
setCIntegerAt
in interface Address
public void setAddressAt(long offset, Address value)
Address
setAddressAt
in interface Address
public void setJBooleanAt(long offset, boolean value) throws UnmappedAddressException, UnalignedAddressException
setJBooleanAt
in interface Address
UnmappedAddressException
UnalignedAddressException
public void setJByteAt(long offset, byte value) throws UnmappedAddressException, UnalignedAddressException
setJByteAt
in interface Address
UnmappedAddressException
UnalignedAddressException
public void setJCharAt(long offset, char value) throws UnmappedAddressException, UnalignedAddressException
setJCharAt
in interface Address
UnmappedAddressException
UnalignedAddressException
public void setJDoubleAt(long offset, double value) throws UnmappedAddressException, UnalignedAddressException
setJDoubleAt
in interface Address
UnmappedAddressException
UnalignedAddressException
public void setJFloatAt(long offset, float value) throws UnmappedAddressException, UnalignedAddressException
setJFloatAt
in interface Address
UnmappedAddressException
UnalignedAddressException
public void setJIntAt(long offset, int value) throws UnmappedAddressException, UnalignedAddressException
setJIntAt
in interface Address
UnmappedAddressException
UnalignedAddressException
public void setJLongAt(long offset, long value) throws UnmappedAddressException, UnalignedAddressException
setJLongAt
in interface Address
UnmappedAddressException
UnalignedAddressException
public void setJShortAt(long offset, short value) throws UnmappedAddressException, UnalignedAddressException
setJShortAt
in interface Address
UnmappedAddressException
UnalignedAddressException
public void setOopHandleAt(long offset, OopHandle value) throws UnmappedAddressException, UnalignedAddressException
setOopHandleAt
in interface Address
UnmappedAddressException
UnalignedAddressException
public Address addOffsetTo(long offset) throws java.lang.UnsupportedOperationException
Address
addOffsetTo
in interface Address
java.lang.UnsupportedOperationException
public OopHandle addOffsetToAsOopHandle(long offset) throws java.lang.UnsupportedOperationException
Address
addOffsetToAsOopHandle
in interface Address
java.lang.UnsupportedOperationException
public long minus(Address arg)
public boolean lessThan(Address a)
Address
public boolean lessThanOrEqual(Address a)
Address
lessThanOrEqual
in interface Address
public boolean greaterThan(Address a)
Address
greaterThan
in interface Address
public boolean greaterThanOrEqual(Address a)
Address
greaterThanOrEqual
in interface Address
public Address andWithMask(long mask) throws java.lang.UnsupportedOperationException
Address
andWithMask
in interface Address
java.lang.UnsupportedOperationException
public Address orWithMask(long mask) throws java.lang.UnsupportedOperationException
Address
orWithMask
in interface Address
java.lang.UnsupportedOperationException
public Address xorWithMask(long mask) throws java.lang.UnsupportedOperationException
Address
xorWithMask
in interface Address
java.lang.UnsupportedOperationException
public static void main(java.lang.String[] args)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.