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

public Class HotSpotAgent

extends Object
Class Inheritance
Imports
java.rmi.RemoteException, java.lang.reflect.Constructor, .InvocationTargetException, sun.jvm.hotspot.debugger.Debugger, .DebuggerException, .JVMDebugger, .MachineDescription, .MachineDescriptionAMD64, .MachineDescriptionPPC64, .MachineDescriptionAArch64, .MachineDescriptionRISCV64, .NoSuchSymbolException, sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal, sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal, sun.jvm.hotspot.debugger.remote.RemoteDebugger, .RemoteDebuggerClient, .RemoteDebuggerServer, sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal, sun.jvm.hotspot.runtime.VM, sun.jvm.hotspot.types.TypeDataBase, sun.jvm.hotspot.utilities.PlatformInfo, .UnsupportedPlatformException

This class wraps much of the basic functionality and is the highest-level factory for VM data structures. It makes it simple to start up the debugging system.

FIXME: especially with the addition of remote debugging, this has turned into a mess; needs rethinking.

Field Summary

Modifier and TypeField and Description
public static final int
private String
private String
private TypeDataBase
private JVMDebugger
private String
private boolean
private String
private String[]
private MachineDescription
private String
private int
public static final int
public static final int
private int
private String
private String
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

This attaches to a process running on the local machine.

public synchronized void
attach(String javaExecutableName, String coreFileName)

This opens a core file on the local machine

public synchronized void
attach(JVMDebugger d)

This uses a JVMDebugger that is already attached to the core or process

public synchronized void
attach(String remoteServerID)

This attaches to a "debug server" on a remote machine; this remote server has already attached to a process or opened a core file and is waiting for RMI calls on the Debugger object to come in.

private void
attachDebugger()

Convenience routine which should be called by per-platform debugger setup.

private void
public synchronized boolean
detach()

This should only be called by the user on the client machine, not the server machine

private boolean
public synchronized JVMDebugger
public int
public synchronized TypeDataBase
private void
go()

private void
private void
private void
private void
private void
private void
private void
private void
private void
private void
private void
private void
private void
pack-priv static void
public synchronized boolean
shutdownServer()
Deprecated for removal since 24.

This may only be called on the server side after startServer() has been called

public synchronized void
startServer(int processID, String serverID, String serverName, int rmiPort)
Deprecated for removal since 24.

This attaches to a process running on the local machine and starts a debug server, allowing remote machines to connect and examine this process.

public synchronized void
startServer(int processID, String serverID, String serverName)
Deprecated for removal since 24.

This attaches to a process running on the local machine and starts a debug server, allowing remote machines to connect and examine this process.

public synchronized void
startServer(int processID)
Deprecated for removal since 24.

This attaches to a process running on the local machine and starts a debug server, allowing remote machines to connect and examine this process.

public synchronized void
startServer(String javaExecutableName, String coreFileName, String serverID, String serverName, int rmiPort)
Deprecated for removal since 24.

This opens a core file on the local machine and starts a debug server, allowing remote machines to connect and examine this core file.

public synchronized void
startServer(String javaExecutableName, String coreFileName, String serverID, String serverName)
Deprecated for removal since 24.

This opens a core file on the local machine and starts a debug server, allowing remote machines to connect and examine this core file.

public synchronized void
startServer(String javaExecutableName, String coreFileName)
Deprecated for removal since 24.

This opens a core file on the local machine and starts a debug server, allowing remote machines to connect and examine this core file.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CORE_FILE_MODEback to summary
public static final int CORE_FILE_MODE
coreFileNameback to summary
private String coreFileName
cpuback to summary
private String cpu
dbback to summary
private TypeDataBase db
debuggerback to summary
private JVMDebugger debugger
debugServerIDback to summary
private String debugServerID
isServerback to summary
private boolean isServer
javaExecutableNameback to summary
private String javaExecutableName
jvmLibNamesback to summary
private String[] jvmLibNames
machDescback to summary
private MachineDescription machDesc
osback to summary
private String os
pidback to summary
private int pid
PROCESS_MODEback to summary
public static final int PROCESS_MODE
REMOTE_MODEback to summary
public static final int REMOTE_MODE
rmiPortback to summary
private int rmiPort
serverIDback to summary
private String serverID
serverNameback to summary
private String serverName
startupModeback to summary
private int startupMode

Constructor Detail

HotSpotAgentback to summary
public HotSpotAgent()

Method Detail

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

This attaches to a process running on the local machine.

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

This opens a core file on the local machine

attachback to summary
public synchronized void attach(JVMDebugger d) throws DebuggerException

This uses a JVMDebugger that is already attached to the core or process

attachback to summary
public synchronized void attach(String remoteServerID) throws DebuggerException

This attaches to a "debug server" on a remote machine; this remote server has already attached to a process or opened a core file and is waiting for RMI calls on the Debugger object to come in.

attachDebuggerback to summary
private void attachDebugger()

Convenience routine which should be called by per-platform debugger setup. Should not be called when startupMode is REMOTE_MODE.

connectRemoteDebuggerback to summary
private void connectRemoteDebugger() throws DebuggerException
detachback to summary
public synchronized boolean detach() throws DebuggerException

This should only be called by the user on the client machine, not the server machine

detachInternalback to summary
private boolean detachInternal()
getDebuggerback to summary
public synchronized JVMDebugger getDebugger()
getStartupModeback to summary
public int getStartupMode()
getTypeDataBaseback to summary
public synchronized TypeDataBase getTypeDataBase()
goback to summary
private void go()
setupDebuggerback to summary
private void setupDebugger()
setupDebuggerAlternateback to summary
private void setupDebuggerAlternate(String alternateName)
setupDebuggerBsdback to summary
private void setupDebuggerBsd()
setupDebuggerDarwinback to summary
private void setupDebuggerDarwin()
setupDebuggerExistingback to summary
private void setupDebuggerExisting()
setupDebuggerLinuxback to summary
private void setupDebuggerLinux()
setupDebuggerWin32back to summary
private void setupDebuggerWin32()
setupJVMLibNamesback to summary
private void setupJVMLibNames(String os)
setupJVMLibNamesBsdback to summary
private void setupJVMLibNamesBsd()
setupJVMLibNamesDarwinback to summary
private void setupJVMLibNamesDarwin()
setupJVMLibNamesLinuxback to summary
private void setupJVMLibNamesLinux()
setupJVMLibNamesWin32back to summary
private void setupJVMLibNamesWin32()
setupVMback to summary
private void setupVM()
showUsageback to summary
pack-priv static void showUsage()
shutdownServerback to summary
public synchronized boolean shutdownServer() throws DebuggerException

Deprecated

for removal since 24.

This may only be called on the server side after startServer() has been called

Annotations
@Deprecated
since:24
forRemoval:true
startServerback to summary
public synchronized void startServer(int processID, String serverID, String serverName, int rmiPort)

Deprecated

for removal since 24.

This attaches to a process running on the local machine and starts a debug server, allowing remote machines to connect and examine this process. Uses specified name to uniquely identify a specific debuggee on the server. Allows to specify the port number to which the RMI connector is bound. If not specified a random available port is used.

Annotations
@Deprecated
since:24
forRemoval:true
startServerback to summary
public synchronized void startServer(int processID, String serverID, String serverName)

Deprecated

for removal since 24.

This attaches to a process running on the local machine and starts a debug server, allowing remote machines to connect and examine this process. Uses specified name to uniquely identify a specific debuggee on the server

Annotations
@Deprecated
since:24
forRemoval:true
startServerback to summary
public synchronized void startServer(int processID) throws DebuggerException

Deprecated

for removal since 24.

This attaches to a process running on the local machine and starts a debug server, allowing remote machines to connect and examine this process.

Annotations
@Deprecated
since:24
forRemoval:true
startServerback to summary
public synchronized void startServer(String javaExecutableName, String coreFileName, String serverID, String serverName, int rmiPort)

Deprecated

for removal since 24.

This opens a core file on the local machine and starts a debug server, allowing remote machines to connect and examine this core file. Uses supplied uniqueID to uniquely identify a specific debuggee. Allows to specify the port number to which the RMI connector is bound. If not specified a random available port is used.

Annotations
@Deprecated
since:24
forRemoval:true
startServerback to summary
public synchronized void startServer(String javaExecutableName, String coreFileName, String serverID, String serverName)

Deprecated

for removal since 24.

This opens a core file on the local machine and starts a debug server, allowing remote machines to connect and examine this core file. Uses supplied uniqueID to uniquely identify a specific debuggee

Annotations
@Deprecated
since:24
forRemoval:true
startServerback to summary
public synchronized void startServer(String javaExecutableName, String coreFileName) throws DebuggerException

Deprecated

for removal since 24.

This opens a core file on the local machine and starts a debug server, allowing remote machines to connect and examine this core file.

Annotations
@Deprecated
since:24
forRemoval:true