APIdia Launch Partner
Top Methods
sun.jvm.hotspot.debugger

public Interface Debugger

extends SymbolLookup, ThreadAccess
Known Direct Subinterfaces
sun.jvm.hotspot.debugger.JVMDebugger
Known Direct Implementers
sun.jvm.hotspot.debugger.DebuggerBase
Imports
java.util.*, sun.jvm.hotspot.debugger.cdbg.CDebugger

Method Summary

Modifier and TypeMethod and Description
public void
attach(int processID)

If an error occurs during attachment (i.e., "no such process"), the thrown DebuggerException will contain a description of the error in its message string.

public void
attach(String executableName, String coreFileName)

This attaches the debugger to the given coreFileName, which is assumed to have been generated from the specified executableName.

public String
consoleExecuteCommand(String cmd)

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

public boolean
detach()

Detach from the remote process.

public String
findSymbol(String symbol)

Find address and executable which contains symbol.

public long
getAddressValue(Address addr)

Returns the 64-bit value of an Address.

public CDebugger
getCDebugger()

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

public String
getConsolePrompt()

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

public String
getCPU()

Support for remote debugging.

public long
public long
getJBooleanSize()

the following methods are intended only for RemoteDebuggerClient

public long
public long
public long
public long
public long
public long
public long
public long
public MachineDescription
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 long
public int
public long
public int
public String
getOS()

Support for remote debugging.

public List<ProcessInfo>
getProcessList()

Provide a snapshot of the list of currently-running processes in the form of a List of ProcessInfo objects.

public boolean
hasConsole()

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

public boolean
hasProcessList()

Indicates whether this underlying debugger can provide a list of currently-running processes.

public Address
parseAddress(String addressString)

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

public ReadResult
readBytesFromProcess(long address, long numBytes)

Inherited from sun.jvm.hotspot.debugger.SymbolLookup:
lookuplookupOop
Inherited from sun.jvm.hotspot.debugger.ThreadAccess:
getThreadForIdentifierAddressgetThreadForThreadId

Method Detail

attachback to summary
public void attach(int processID) throws DebuggerException

If an error occurs during attachment (i.e., "no such process"), the thrown DebuggerException will contain a description of the error in its message string.

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

This attaches the debugger to the given coreFileName, which is assumed to have been generated from the specified executableName. If an error occurs during loading of the core file (i.e., "no such file"), the thrown DebuggerException will contain a description of the error in its message string.

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

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() throws DebuggerException

Detach from the remote process. Returns false if not currently attached.

findSymbolback to summary
public String findSymbol(String symbol)

Find address and executable which contains symbol.

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

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

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

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

getCPUback to summary
public String getCPU() throws DebuggerException

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.

getHeapOopSizeback to summary
public long getHeapOopSize()
getJBooleanSizeback to summary
public long getJBooleanSize()

the following methods are intended only for RemoteDebuggerClient

getJByteSizeback to summary
public long getJByteSize()
getJCharSizeback to summary
public long getJCharSize()
getJDoubleSizeback to summary
public long getJDoubleSize()
getJFloatSizeback to summary
public long getJFloatSize()
getJIntSizeback to summary
public long getJIntSize()
getJLongSizeback to summary
public long getJLongSize()
getJShortSizeback to summary
public long getJShortSize()
getKlassPtrSizeback to summary
public long getKlassPtrSize()
getMachineDescriptionback to summary
public MachineDescription getMachineDescription() throws DebuggerException

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

getNarrowKlassBaseback to summary
public long getNarrowKlassBase()
getNarrowKlassShiftback to summary
public int getNarrowKlassShift()
getNarrowOopBaseback to summary
public long getNarrowOopBase()
getNarrowOopShiftback to summary
public int getNarrowOopShift()
getOSback to summary
public String getOS() throws DebuggerException

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

Provide a snapshot of the list of currently-running processes in the form of a List of ProcessInfo objects. Must only be called if hasProcessList(), above, returns true.

hasConsoleback to summary
public boolean hasConsole() throws DebuggerException

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

Indicates whether this underlying debugger can provide a list of currently-running processes.

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

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.

readBytesFromProcessback to summary
public ReadResult readBytesFromProcess(long address, long numBytes) throws DebuggerException