APIdia Launch Partner
Top Description Fields Constructors Methods
sun.jvm.hotspot.debugger.remote

public Class RemoteDebuggerClient

extends DebuggerBase
implements JVMDebugger
Class Inheritance
All Implemented Interfaces
sun.jvm.hotspot.debugger.JVMDebugger, sun.jvm.hotspot.debugger.Debugger, sun.jvm.hotspot.debugger.ThreadAccess, sun.jvm.hotspot.debugger.SymbolLookup
Imports
java.rmi.*, java.util.*, java.lang.reflect.*, sun.jvm.hotspot.debugger.*, sun.jvm.hotspot.debugger.cdbg.*, sun.jvm.hotspot.debugger.remote.amd64.*, sun.jvm.hotspot.debugger.remote.ppc64.*

An implementation of Debugger which wraps a RemoteDebugger, providing remote debugging via RMI. This implementation provides caching of the remote process's address space on the local machine where the user interface is running.

Field Summary

Modifier and TypeField and Description
private static final int
private RemoteDebugger
private RemoteThreadFactory
Inherited from sun.jvm.hotspot.debugger.DebuggerBase:
heapOopSizejavaPrimitiveTypesConfiguredjbooleanSizejbyteSizejcharSizejdoubleSizejfloatSizejintSizejlongSizejshortSizeklassPtrSizemachDescnarrowKlassBasenarrowKlassShiftnarrowOopBasenarrowOopShiftoopSizeutils

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
pack-priv boolean
pack-priv boolean
areThreadsEqual(long id1, long id2)

pack-priv boolean
areThreadsEqual(Address addr1, long id2)

pack-priv boolean
areThreadsEqual(long id1, Address addr2)

public void
attach(int processID)

Implements sun.jvm.hotspot.debugger.Debugger.attach.

Unimplemented in this class (remote remoteDebugger should already be attached)

public void
attach(String executableName, String coreFileName)

Implements sun.jvm.hotspot.debugger.Debugger.attach.

Unimplemented in this class (remote remoteDebugger should already be attached)

public void
configureJavaPrimitiveTypeSizes(long jbooleanSize, long jbyteSize, long jcharSize, long jdoubleSize, long jfloatSize, long jintSize, long jlongSize, long jshortSize)

Overrides sun.jvm.hotspot.debugger.DebuggerBase.configureJavaPrimitiveTypeSizes.

Implements sun.jvm.hotspot.debugger.JVMDebugger.configureJavaPrimitiveTypeSizes.

Unimplemented in this class (remote remoteDebugger should already be configured)

public String
consoleExecuteCommand(String cmd)

Implements sun.jvm.hotspot.debugger.Debugger.consoleExecuteCommand.

If the underlying debugger has a console (as dbx does), this provides access to it.

public boolean
detach()

Implements sun.jvm.hotspot.debugger.Debugger.detach.

Unimplemented in this class (remote remoteDebugger can not be detached)

public String
public String
findSymbol(String symbol)

Overrides sun.jvm.hotspot.debugger.DebuggerBase.findSymbol.

Implements sun.jvm.hotspot.debugger.Debugger.findSymbol.

Find address and executable which contains symbol.

public long
getAddressValue(Address addr)

Implements sun.jvm.hotspot.debugger.Debugger.getAddressValue.

Returns the 64-bit value of an Address.

public CDebugger
getCDebugger()

Implements sun.jvm.hotspot.debugger.Debugger.getCDebugger.

If this platform supports C/C++ debugging via the CDebugger interface, returns a CDebugger object; otherwise returns null.

public String
getConsolePrompt()

Implements sun.jvm.hotspot.debugger.Debugger.getConsolePrompt.

If the underlying debugger has a console, this returns the debugger-specific prompt which should be displayed.

public String
getCPU()

Implements sun.jvm.hotspot.debugger.Debugger.getCPU.

Support for remote debugging.

public MachineDescription
getMachineDescription()

Implements sun.jvm.hotspot.debugger.Debugger.getMachineDescription.

Retrieve the machine description for the underlying hardware for the cases in which we need to do, for example, machine-dependent byte swapping

public String
getOS()

Implements sun.jvm.hotspot.debugger.Debugger.getOS.

Support for remote debugging.

public List<ProcessInfo>
getProcessList()

Implements sun.jvm.hotspot.debugger.Debugger.getProcessList.

Unimplemented in this class (remote remoteDebugger should already be attached)

public int
public ThreadProxy
getThreadForIdentifierAddress(Address addr)

Implements sun.jvm.hotspot.debugger.ThreadAccess.getThreadForIdentifierAddress.

Gets an abstract ThreadProxy object for the thread identified by the contents of the memory location pointed to by addr.

public ThreadProxy
getThreadForThreadId(long id)

Implements sun.jvm.hotspot.debugger.ThreadAccess.getThreadForThreadId.

Gets an abstract ThreadProxy object for the thread identified by id or handle that is platform dependent

pack-priv int
pack-priv int
public long[]
public long[]
public boolean
hasConsole()

Implements sun.jvm.hotspot.debugger.Debugger.hasConsole.

Find out whether this debugger has a console available on which commands can be executed; see executeCommandOnConsole, below.

public boolean
hasProcessList()

Implements sun.jvm.hotspot.debugger.Debugger.hasProcessList.

Unimplemented in this class (remote remoteDebugger should already be attached)

public Address
lookup(String objectName, String symbol)

Implements sun.jvm.hotspot.debugger.SymbolLookup.lookup.

Looks up the given symbol in the context of the given object.

public OopHandle
lookupOop(String objectName, String symbol)

Implements sun.jvm.hotspot.debugger.SymbolLookup.lookupOop.

Looks up the given symbol in the context of the given object, assuming that symbol refers to a Java object.

public Address
public Address
parseAddress(String addressString)

Implements sun.jvm.hotspot.debugger.Debugger.parseAddress.

Parse an address from a hex string in the format "0xFFFFFFFF".

pack-priv RemoteAddress
readAddress(long address)

public ReadResult
readBytesFromProcess(long address, long numBytes)

Implements sun.jvm.hotspot.debugger.Debugger.readBytesFromProcess.

This reads bytes from the remote process.

pack-priv RemoteAddress
readCompKlassAddress(long address)

pack-priv RemoteAddress
readCompOopAddress(long address)

pack-priv RemoteOopHandle
readCompOopHandle(long address)

pack-priv RemoteOopHandle
readOopHandle(long address)

public void
Inherited from sun.jvm.hotspot.debugger.DebuggerBase:
checkConfiguredcheckJavaConfiguredclearCachedisableCacheenableCachegetHeapOopSizegetJBooleanSizegetJByteSizegetJCharSizegetJDoubleSizegetJFloatSizegetJIntSizegetJLongSizegetJShortSizegetKlassPtrSizegetNarrowKlassBasegetNarrowKlassShiftgetNarrowOopBasegetNarrowOopShiftinitCacheinvalidatePageCacheparseCacheNumPagesPropertyputHeapConstreadAddressValuereadBytesreadCIntegerreadCompKlassAddressValuereadCompOopAddressValuereadJBooleanreadJBytereadJCharreadJDoublereadJFloatreadJIntreadJLongreadJShortsetBigEndian

Field Detail

cacheSizeback to summary
private static final int cacheSize
remoteDebuggerback to summary
private RemoteDebugger remoteDebugger
threadFactoryback to summary
private RemoteThreadFactory threadFactory

Constructor Detail

RemoteDebuggerClientback to summary
public RemoteDebuggerClient(RemoteDebugger remoteDebugger) throws DebuggerException

Method Detail

addressValueToStringback to summary
public String addressValueToString(long addr)
areThreadsEqualback to summary
pack-priv boolean areThreadsEqual(Address addr1, Address addr2)
areThreadsEqualback to summary
pack-priv boolean areThreadsEqual(long id1, long id2)
areThreadsEqualback to summary
pack-priv boolean areThreadsEqual(Address addr1, long id2)
areThreadsEqualback to summary
pack-priv boolean areThreadsEqual(long id1, Address addr2)
attachback to summary
public void attach(int processID) throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.attach.

Unimplemented in this class (remote remoteDebugger should already be attached)

attachback to summary
public void attach(String executableName, String coreFileName) throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.attach.

Unimplemented in this class (remote remoteDebugger should already be attached)

configureJavaPrimitiveTypeSizesback to summary
public void configureJavaPrimitiveTypeSizes(long jbooleanSize, long jbyteSize, long jcharSize, long jdoubleSize, long jfloatSize, long jintSize, long jlongSize, long jshortSize)

Overrides sun.jvm.hotspot.debugger.DebuggerBase.configureJavaPrimitiveTypeSizes.

Implements sun.jvm.hotspot.debugger.JVMDebugger.configureJavaPrimitiveTypeSizes.

Unimplemented in this class (remote remoteDebugger should already be configured)

consoleExecuteCommandback to summary
public String consoleExecuteCommand(String cmd) throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.consoleExecuteCommand.

Doc from sun.jvm.hotspot.debugger.Debugger.consoleExecuteCommand.

If the underlying debugger has a console (as dbx does), this provides access to it. Takes in a platform-dependent String, executes it on the debugger's console, and returns any output as a String.

detachback to summary
public boolean detach()

Implements sun.jvm.hotspot.debugger.Debugger.detach.

Unimplemented in this class (remote remoteDebugger can not be detached)

execCommandOnServerback to summary
public String execCommandOnServer(String command, Map<String, Object> options)
findSymbolback to summary
public String findSymbol(String symbol)

Overrides sun.jvm.hotspot.debugger.DebuggerBase.findSymbol.

Implements sun.jvm.hotspot.debugger.Debugger.findSymbol.

Doc from sun.jvm.hotspot.debugger.Debugger.findSymbol.

Find address and executable which contains symbol.

Annotations
@Override
getAddressValueback to summary
public long getAddressValue(Address addr) throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.getAddressValue.

Doc from sun.jvm.hotspot.debugger.Debugger.getAddressValue.

Returns the 64-bit value of an Address. This method should ONLY be used when implementing a debugger which needs to interface to C and which needs a unique identifier for certain objects.

getCDebuggerback to summary
public CDebugger getCDebugger() throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.getCDebugger.

Doc from sun.jvm.hotspot.debugger.Debugger.getCDebugger.

If this platform supports C/C++ debugging via the CDebugger interface, returns a CDebugger object; otherwise returns null.

getConsolePromptback to summary
public String getConsolePrompt() throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.getConsolePrompt.

Doc from sun.jvm.hotspot.debugger.Debugger.getConsolePrompt.

If the underlying debugger has a console, this returns the debugger-specific prompt which should be displayed.

getCPUback to summary
public String getCPU()

Implements sun.jvm.hotspot.debugger.Debugger.getCPU.

Doc from sun.jvm.hotspot.debugger.Debugger.getCPU.

Support for remote debugging. Get the name of the CPU type on which this debugger is running (to be able to properly configure the local system). Typical return value is "amd64"; see utilities/PlatformInfo.java.

getMachineDescriptionback to summary
public MachineDescription getMachineDescription() throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.getMachineDescription.

Doc from sun.jvm.hotspot.debugger.Debugger.getMachineDescription.

Retrieve the machine description for the underlying hardware for the cases in which we need to do, for example, machine-dependent byte swapping

getOSback to summary
public String getOS() throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.getOS.

Doc from sun.jvm.hotspot.debugger.Debugger.getOS.

Support for remote debugging. Get the name of the operating system on which this debugger is running (to be able to properly configure the local system). Typical return values are "linux", "win32"; see utilities/PlatformInfo.java.

getProcessListback to summary
public List<ProcessInfo> getProcessList() throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.getProcessList.

Unimplemented in this class (remote remoteDebugger should already be attached)

getRemoteProcessAddressSizeback to summary
public int getRemoteProcessAddressSize()
getThreadForIdentifierAddressback to summary
public ThreadProxy getThreadForIdentifierAddress(Address addr)

Implements sun.jvm.hotspot.debugger.ThreadAccess.getThreadForIdentifierAddress.

Doc from sun.jvm.hotspot.debugger.ThreadAccess.getThreadForIdentifierAddress.

Gets an abstract ThreadProxy object for the thread identified by the contents of the memory location pointed to by addr. The contents at location addr are inherently platform-dependent; see the documentation for this class for more information. FIXME: what exception, if any, should this throw?

getThreadForThreadIdback to summary
public ThreadProxy getThreadForThreadId(long id)

Implements sun.jvm.hotspot.debugger.ThreadAccess.getThreadForThreadId.

Doc from sun.jvm.hotspot.debugger.ThreadAccess.getThreadForThreadId.

Gets an abstract ThreadProxy object for the thread identified by id or handle that is platform dependent

getThreadHashCodeback to summary
pack-priv int getThreadHashCode(Address a)
getThreadHashCodeback to summary
pack-priv int getThreadHashCode(long id)
getThreadIntegerRegisterSetback to summary
public long[] getThreadIntegerRegisterSet(Address addr)
getThreadIntegerRegisterSetback to summary
public long[] getThreadIntegerRegisterSet(long id)
hasConsoleback to summary
public boolean hasConsole() throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.hasConsole.

Doc from sun.jvm.hotspot.debugger.Debugger.hasConsole.

Find out whether this debugger has a console available on which commands can be executed; see executeCommandOnConsole, below. This is an interim routine designed to allow access to the underlying dbx process on Solaris until we have disassembly, etc. in the SA.

hasProcessListback to summary
public boolean hasProcessList() throws DebuggerException

Implements sun.jvm.hotspot.debugger.Debugger.hasProcessList.

Unimplemented in this class (remote remoteDebugger should already be attached)

lookupback to summary
public Address lookup(String objectName, String symbol)

Implements sun.jvm.hotspot.debugger.SymbolLookup.lookup.

Doc from sun.jvm.hotspot.debugger.SymbolLookup.lookup.

Looks up the given symbol in the context of the given object.

FIXME: we may want to hide the objectName so the user does not have to specify it, but it isn't clear whether this will work transparently with dbx.

FIXME: what happens if the address is not found? Throw exception? Currently returns null.

lookupOopback to summary
public OopHandle lookupOop(String objectName, String symbol)

Implements sun.jvm.hotspot.debugger.SymbolLookup.lookupOop.

Doc from sun.jvm.hotspot.debugger.SymbolLookup.lookupOop.

Looks up the given symbol in the context of the given object, assuming that symbol refers to a Java object. FIXME: still not sure whether this will be necessary. Seems that lookup of static fields with type "oop" already works, since the lookup routine returns the address of the oop (i.e., an oopDesc**).

FIXME: we may want to hide the objectName so the user does not have to specify it, but it isn't clear whether this will work transparently with dbx.

FIXME: what happens if the address is not found? Throw exception? Currently returns null.

newAddressback to summary
public Address newAddress(long value)

Implements sun.jvm.hotspot.debugger.JVMDebugger.newAddress.

parseAddressback to summary
public Address parseAddress(String addressString) throws NumberFormatException

Implements sun.jvm.hotspot.debugger.Debugger.parseAddress.

Doc from sun.jvm.hotspot.debugger.Debugger.parseAddress.

Parse an address from a hex string in the format "0xFFFFFFFF". The length of the address (i.e., 32 or 64 bits) is platform dependent. This method should ONLY be used by routines which need to interact with the user and parse a string entered by hand; for example, a graphical user interface. This routine should NOT be used to subvert the current safety mechanisms in the system which prevent arbitrary conversion from Address to long and back.

readAddressback to summary
pack-priv RemoteAddress readAddress(long address) throws UnmappedAddressException, UnalignedAddressException
readBytesFromProcessback to summary
public ReadResult readBytesFromProcess(long address, long numBytes)

Implements sun.jvm.hotspot.debugger.Debugger.readBytesFromProcess.

This reads bytes from the remote process.

readCompKlassAddressback to summary
pack-priv RemoteAddress readCompKlassAddress(long address) throws UnmappedAddressException, UnalignedAddressException
readCompOopAddressback to summary
pack-priv RemoteAddress readCompOopAddress(long address) throws UnmappedAddressException, UnalignedAddressException
readCompOopHandleback to summary
pack-priv RemoteOopHandle readCompOopHandle(long address) throws UnmappedAddressException, UnalignedAddressException, NotInHeapException
readOopHandleback to summary
pack-priv RemoteOopHandle readOopHandle(long address) throws UnmappedAddressException, UnalignedAddressException, NotInHeapException
setMachineDescriptionback to summary
public void setMachineDescription(MachineDescription machDesc)