< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HotSpotAgent.java
Print this page
rev 59104 : imported patch serviceability
*** 34,49 ****
import sun.jvm.hotspot.debugger.MachineDescription;
import sun.jvm.hotspot.debugger.MachineDescriptionAMD64;
import sun.jvm.hotspot.debugger.MachineDescriptionPPC64;
import sun.jvm.hotspot.debugger.MachineDescriptionAArch64;
import sun.jvm.hotspot.debugger.MachineDescriptionIntelX86;
- import sun.jvm.hotspot.debugger.MachineDescriptionSPARC32Bit;
- import sun.jvm.hotspot.debugger.MachineDescriptionSPARC64Bit;
import sun.jvm.hotspot.debugger.NoSuchSymbolException;
import sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal;
import sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal;
- import sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal;
import sun.jvm.hotspot.debugger.remote.RemoteDebugger;
import sun.jvm.hotspot.debugger.remote.RemoteDebuggerClient;
import sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer;
import sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal;
import sun.jvm.hotspot.runtime.VM;
--- 34,46 ----
*** 355,367 ****
os = PlatformInfo.getOS();
cpu = PlatformInfo.getCPU();
} catch (UnsupportedPlatformException e) {
throw new DebuggerException(e);
}
! if (os.equals("solaris")) {
! setupDebuggerSolaris();
! } else if (os.equals("win32")) {
setupDebuggerWin32();
} else if (os.equals("linux")) {
setupDebuggerLinux();
} else if (os.equals("bsd")) {
setupDebuggerBsd();
--- 352,362 ----
os = PlatformInfo.getOS();
cpu = PlatformInfo.getCPU();
} catch (UnsupportedPlatformException e) {
throw new DebuggerException(e);
}
! if (os.equals("win32")) {
setupDebuggerWin32();
} else if (os.equals("linux")) {
setupDebuggerLinux();
} else if (os.equals("bsd")) {
setupDebuggerBsd();
*** 409,423 ****
// configure the Java primitive type sizes (which we should
// consider making constant). On the client it is used to
// configure the VM.
try {
! if (os.equals("solaris")) {
! db = new HotSpotTypeDataBase(machDesc,
! new HotSpotSolarisVtblAccess(debugger, jvmLibNames),
! debugger, jvmLibNames);
! } else if (os.equals("win32")) {
db = new HotSpotTypeDataBase(machDesc,
new Win32VtblAccess(debugger, jvmLibNames),
debugger, jvmLibNames);
} else if (os.equals("linux")) {
db = new HotSpotTypeDataBase(machDesc,
--- 404,414 ----
// configure the Java primitive type sizes (which we should
// consider making constant). On the client it is used to
// configure the VM.
try {
! if (os.equals("win32")) {
db = new HotSpotTypeDataBase(machDesc,
new Win32VtblAccess(debugger, jvmLibNames),
debugger, jvmLibNames);
} else if (os.equals("linux")) {
db = new HotSpotTypeDataBase(machDesc,
*** 502,548 ****
}
System.err.println("Loaded alternate HotSpot SA Debugger: " + alternateName);
}
- //
- // Solaris
- //
-
- private void setupDebuggerSolaris() {
- setupJVMLibNamesSolaris();
- ProcDebuggerLocal dbg = new ProcDebuggerLocal(null, true);
- debugger = dbg;
- attachDebugger();
-
- // Set up CPU-dependent stuff
- if (cpu.equals("x86")) {
- machDesc = new MachineDescriptionIntelX86();
- } else if (cpu.equals("sparc")) {
- int addressSize = dbg.getRemoteProcessAddressSize();
- if (addressSize == -1) {
- throw new DebuggerException("Error occurred while trying to determine the remote process's " +
- "address size");
- }
-
- if (addressSize == 32) {
- machDesc = new MachineDescriptionSPARC32Bit();
- } else if (addressSize == 64) {
- machDesc = new MachineDescriptionSPARC64Bit();
- } else {
- throw new DebuggerException("Address size " + addressSize + " is not supported on SPARC");
- }
- } else if (cpu.equals("amd64")) {
- machDesc = new MachineDescriptionAMD64();
- } else {
- throw new DebuggerException("Solaris only supported on sparc/sparcv9/x86/amd64");
- }
-
- dbg.setMachineDescription(machDesc);
- return;
- }
-
private void connectRemoteDebugger() throws DebuggerException {
RemoteDebugger remote =
(RemoteDebugger) RMIHelper.lookup(debugServerID);
debugger = new RemoteDebuggerClient(remote);
machDesc = ((RemoteDebuggerClient) debugger).getMachineDescription();
--- 493,502 ----
*** 550,562 ****
setupJVMLibNames(os);
cpu = debugger.getCPU();
}
private void setupJVMLibNames(String os) {
! if (os.equals("solaris")) {
! setupJVMLibNamesSolaris();
! } else if (os.equals("win32")) {
setupJVMLibNamesWin32();
} else if (os.equals("linux")) {
setupJVMLibNamesLinux();
} else if (os.equals("bsd")) {
setupJVMLibNamesBsd();
--- 504,514 ----
setupJVMLibNames(os);
cpu = debugger.getCPU();
}
private void setupJVMLibNames(String os) {
! if (os.equals("win32")) {
setupJVMLibNamesWin32();
} else if (os.equals("linux")) {
setupJVMLibNamesLinux();
} else if (os.equals("bsd")) {
setupJVMLibNamesBsd();
*** 565,578 ****
} else {
throw new RuntimeException("Unknown OS type");
}
}
- private void setupJVMLibNamesSolaris() {
- jvmLibNames = new String[] { "libjvm.so" };
- }
-
//
// Win32
//
private void setupDebuggerWin32() {
--- 517,526 ----
*** 614,629 ****
machDesc = new MachineDescriptionAMD64();
} else if (cpu.equals("ppc64")) {
machDesc = new MachineDescriptionPPC64();
} else if (cpu.equals("aarch64")) {
machDesc = new MachineDescriptionAArch64();
- } else if (cpu.equals("sparc")) {
- if (LinuxDebuggerLocal.getAddressSize()==8) {
- machDesc = new MachineDescriptionSPARC64Bit();
- } else {
- machDesc = new MachineDescriptionSPARC32Bit();
- }
} else {
try {
machDesc = (MachineDescription)
Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
cpu.toUpperCase()).getDeclaredConstructor().newInstance();
--- 562,571 ----
< prev index next >