DebuggerBase is a recommended base class for debugger implementations. It can use a PageCache to cache data from the target process. Note that this class would not be suitable if the system were used to reflect upon itself; it would never be safe to store the value in an OopHandle in anything but an OopHandle. However, it provides a fair amount of code sharing to the current dbx and win32 implementations.
NOTE that much of the code sharing is achieved by having this class implement many of the methods in the Win32Debugger and DbxDebugger interfaces.
Modifier and Type | Class and Description |
---|---|
pack-priv class |
Modifier and Type | Field and Description |
---|---|
private boolean | |
private PageCache | |
protected long | |
protected boolean | |
protected long | |
protected long | |
protected long | |
protected long | |
protected long | |
protected long | |
protected long | |
protected long | |
protected long | |
protected MachineDescription | |
protected long | |
protected int | |
protected long | |
protected int | |
protected long | |
private long | |
private boolean | |
protected DebuggerUtilities |
Access | Constructor and Description |
---|---|
protected |
Modifier and Type | Method and Description |
---|---|
private boolean | canUsePageCacheFor64bitRead(long address)
If an address for a 64-bit value starts on the last 32-bit word of a page, then we can't use the page cache to read it because it will cause an ArrayIndexOutOfBoundsException when reading past the end of the page. |
protected final void | |
protected final void | |
protected final void | |
public void | configureJavaPrimitiveTypeSizes(long jbooleanSize, long jbyteSize, long jcharSize, long jdoubleSize, long jfloatSize, long jintSize, long jlongSize, long jshortSize)
From the JVMDebugger interface. |
protected final void | disableCache()
May be called by subclasses to disable the cache (for example, when the target process has been resumed) but may not be overridden. |
protected final void | enableCache()
May be called by subclasses to re-enable the cache (for example, when the target process has been suspended) but may not be overridden. |
public String | findSymbol(String symbol)
Implements sun. |
public long | |
public long | getJBooleanSize()
Implements sun. |
public long | |
public long | |
public long | |
public long | |
public long | |
public long | |
public long | |
public long | |
public long | |
public int | |
public long | |
public int | |
protected final void | initCache(long pageSize, long maxNumPages)
May be called by subclasses if desired to initialize the page cache but may not be overridden |
protected void | invalidatePageCache(long startAddress, long numBytes)
Interim solution for allowing subclasses to write bytes to process until we make that functionality available in the basic Address interface |
protected int | parseCacheNumPagesProperty(int defaultNum)
Possibly override page cache size with user-specified property |
public void | putHeapConst(long heapOopSize, long klassPtrSize, long narrowOopBase, int narrowOopShift, long narrowKlassBase, int narrowKlassShift)
|
protected long | |
protected final byte[] | readBytes(long address, long numBytes)
May be called by subclasses directly but may not be overridden |
public long | |
protected long | |
protected long | |
public boolean | |
public byte | |
public char | |
public double | |
public float | |
public int | |
public long | |
public short | |
protected final void | setBigEndian(boolean bigEndian)
May be called by subclasses if needed (if the machine description is not available at the time of cache initialization, as on Solaris) but may not be overridden |
bigEndian | back to summary |
---|---|
private boolean bigEndian |
cache | back to summary |
---|---|
private PageCache cache |
heapOopSize | back to summary |
---|---|
protected long heapOopSize |
javaPrimitiveTypesConfigured | back to summary |
---|---|
protected boolean javaPrimitiveTypesConfigured |
jbooleanSize | back to summary |
---|---|
protected long jbooleanSize |
jbyteSize | back to summary |
---|---|
protected long jbyteSize |
jcharSize | back to summary |
---|---|
protected long jcharSize |
jdoubleSize | back to summary |
---|---|
protected long jdoubleSize |
jfloatSize | back to summary |
---|---|
protected long jfloatSize |
jintSize | back to summary |
---|---|
protected long jintSize |
jlongSize | back to summary |
---|---|
protected long jlongSize |
jshortSize | back to summary |
---|---|
protected long jshortSize |
klassPtrSize | back to summary |
---|---|
protected long klassPtrSize |
machDesc | back to summary |
---|---|
protected MachineDescription machDesc |
narrowKlassBase | back to summary |
---|---|
protected long narrowKlassBase |
narrowKlassShift | back to summary |
---|---|
protected int narrowKlassShift |
narrowOopBase | back to summary |
---|---|
protected long narrowOopBase |
narrowOopShift | back to summary |
---|---|
protected int narrowOopShift |
oopSize | back to summary |
---|---|
protected long oopSize |
pageSize | back to summary |
---|---|
private long pageSize |
useFastAccessors | back to summary |
---|---|
private boolean useFastAccessors |
utils | back to summary |
---|---|
protected DebuggerUtilities utils |
DebuggerBase | back to summary |
---|---|
protected DebuggerBase() |
canUsePageCacheFor64bitRead | back to summary |
---|---|
private boolean canUsePageCacheFor64bitRead(long address) If an address for a 64-bit value starts on the last 32-bit word of a page, then we can't use the page cache to read it because it will cause an ArrayIndexOutOfBoundsException when reading past the end of the page. |
checkConfigured | back to summary |
---|---|
protected final void checkConfigured() Can be called by subclasses but can not be overridden |
checkJavaConfigured | back to summary |
---|---|
protected final void checkJavaConfigured() Can be called by subclasses but can not be overridden |
clearCache | back to summary |
---|---|
protected final void clearCache() May be called by subclasses to clear out the cache but may not be overridden. For convenience, this can be called even if the cache has not been initialized. |
configureJavaPrimitiveTypeSizes | back to summary |
---|---|
public void configureJavaPrimitiveTypeSizes(long jbooleanSize, long jbyteSize, long jcharSize, long jdoubleSize, long jfloatSize, long jintSize, long jlongSize, long jshortSize) From the JVMDebugger interface. This is the only public method of this class. |
disableCache | back to summary |
---|---|
protected final void disableCache() May be called by subclasses to disable the cache (for example, when the target process has been resumed) but may not be overridden. For convenience, this can be called even if the cache has not been initialized. |
enableCache | back to summary |
---|---|
protected final void enableCache() May be called by subclasses to re-enable the cache (for example, when the target process has been suspended) but may not be overridden. For convenience, this can be called even if the cache has not been initialized. |
findSymbol | back to summary |
---|---|
public String findSymbol(String symbol) Implements sun. Doc from sun. Find address and executable which contains symbol.
|
getHeapOopSize | back to summary |
---|---|
public long getHeapOopSize() Implements sun. |
getJBooleanSize | back to summary |
---|---|
public long getJBooleanSize() Implements sun. Doc from sun. the following methods are intended only for RemoteDebuggerClient |
getJByteSize | back to summary |
---|---|
public long getJByteSize() Implements sun. |
getJCharSize | back to summary |
---|---|
public long getJCharSize() Implements sun. |
getJDoubleSize | back to summary |
---|---|
public long getJDoubleSize() Implements sun. |
getJFloatSize | back to summary |
---|---|
public long getJFloatSize() Implements sun. |
getJIntSize | back to summary |
---|---|
public long getJIntSize() Implements sun. |
getJLongSize | back to summary |
---|---|
public long getJLongSize() Implements sun. |
getJShortSize | back to summary |
---|---|
public long getJShortSize() Implements sun. |
getKlassPtrSize | back to summary |
---|---|
public long getKlassPtrSize() Implements sun. |
getNarrowKlassBase | back to summary |
---|---|
public long getNarrowKlassBase() Implements sun. |
getNarrowKlassShift | back to summary |
---|---|
public int getNarrowKlassShift() Implements sun. |
getNarrowOopBase | back to summary |
---|---|
public long getNarrowOopBase() Implements sun. |
getNarrowOopShift | back to summary |
---|---|
public int getNarrowOopShift() Implements sun. |
initCache | back to summary |
---|---|
protected final void initCache(long pageSize, long maxNumPages) May be called by subclasses if desired to initialize the page cache but may not be overridden |
invalidatePageCache | back to summary |
---|---|
protected void invalidatePageCache(long startAddress, long numBytes) Interim solution for allowing subclasses to write bytes to process until we make that functionality available in the basic Address interface |
parseCacheNumPagesProperty | back to summary |
---|---|
protected int parseCacheNumPagesProperty(int defaultNum) Possibly override page cache size with user-specified property |
putHeapConst | back to summary |
---|---|
public void putHeapConst(long heapOopSize, long klassPtrSize, long narrowOopBase, int narrowOopShift, long narrowKlassBase, int narrowKlassShift) |
readAddressValue | back to summary |
---|---|
protected long readAddressValue(long address) throws UnmappedAddressException, UnalignedAddressException |
readBytes | back to summary |
---|---|
protected final byte[] readBytes(long address, long numBytes) throws UnmappedAddressException, DebuggerException May be called by subclasses directly but may not be overridden |
readCInteger | back to summary |
---|---|
public long readCInteger(long address, long numBytes, boolean isUnsigned) throws UnmappedAddressException, UnalignedAddressException |
readCompKlassAddressValue | back to summary |
---|---|
protected long readCompKlassAddressValue(long address) throws UnmappedAddressException, UnalignedAddressException |
readCompOopAddressValue | back to summary |
---|---|
protected long readCompOopAddressValue(long address) throws UnmappedAddressException, UnalignedAddressException |
readJBoolean | back to summary |
---|---|
public boolean readJBoolean(long address) throws UnmappedAddressException, UnalignedAddressException |
readJByte | back to summary |
---|---|
public byte readJByte(long address) throws UnmappedAddressException, UnalignedAddressException |
readJChar | back to summary |
---|---|
public char readJChar(long address) throws UnmappedAddressException, UnalignedAddressException |
readJDouble | back to summary |
---|---|
public double readJDouble(long address) throws UnmappedAddressException, UnalignedAddressException |
readJFloat | back to summary |
---|---|
public float readJFloat(long address) throws UnmappedAddressException, UnalignedAddressException |
readJInt | back to summary |
---|---|
public int readJInt(long address) throws UnmappedAddressException, UnalignedAddressException |
readJLong | back to summary |
---|---|
public long readJLong(long address) throws UnmappedAddressException, UnalignedAddressException |
readJShort | back to summary |
---|---|
public short readJShort(long address) throws UnmappedAddressException, UnalignedAddressException |
setBigEndian | back to summary |
---|---|
protected final void setBigEndian(boolean bigEndian) May be called by subclasses if needed (if the machine description is not available at the time of cache initialization, as on Solaris) but may not be overridden |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public Page | fetchPage(long pageBaseAddress, long numBytes)
Implements sun. |
Fetcher | back to summary |
---|---|
pack-priv Fetcher() |
fetchPage | back to summary |
---|---|
public Page fetchPage(long pageBaseAddress, long numBytes) Implements sun. |