18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 package sun.jvm.hotspot;
26
27 import java.rmi.RemoteException;
28 import java.lang.reflect.Constructor;
29 import java.lang.reflect.InvocationTargetException;
30
31 import sun.jvm.hotspot.debugger.Debugger;
32 import sun.jvm.hotspot.debugger.DebuggerException;
33 import sun.jvm.hotspot.debugger.JVMDebugger;
34 import sun.jvm.hotspot.debugger.MachineDescription;
35 import sun.jvm.hotspot.debugger.MachineDescriptionAMD64;
36 import sun.jvm.hotspot.debugger.MachineDescriptionPPC64;
37 import sun.jvm.hotspot.debugger.MachineDescriptionAArch64;
38 import sun.jvm.hotspot.debugger.MachineDescriptionIntelX86;
39 import sun.jvm.hotspot.debugger.MachineDescriptionSPARC32Bit;
40 import sun.jvm.hotspot.debugger.MachineDescriptionSPARC64Bit;
41 import sun.jvm.hotspot.debugger.NoSuchSymbolException;
42 import sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal;
43 import sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal;
44 import sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal;
45 import sun.jvm.hotspot.debugger.remote.RemoteDebugger;
46 import sun.jvm.hotspot.debugger.remote.RemoteDebuggerClient;
47 import sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer;
48 import sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal;
49 import sun.jvm.hotspot.runtime.VM;
50 import sun.jvm.hotspot.types.TypeDataBase;
51 import sun.jvm.hotspot.utilities.PlatformInfo;
52 import sun.jvm.hotspot.utilities.UnsupportedPlatformException;
53
54 /** <P> This class wraps much of the basic functionality and is the
55 * highest-level factory for VM data structures. It makes it simple
56 * to start up the debugging system. </P>
57 *
572
573 private void setupJVMLibNamesWin32() {
574 jvmLibNames = new String[] { "jvm.dll" };
575 }
576
577 //
578 // Linux
579 //
580
581 private void setupDebuggerLinux() {
582 setupJVMLibNamesLinux();
583
584 if (cpu.equals("x86")) {
585 machDesc = new MachineDescriptionIntelX86();
586 } else if (cpu.equals("amd64")) {
587 machDesc = new MachineDescriptionAMD64();
588 } else if (cpu.equals("ppc64")) {
589 machDesc = new MachineDescriptionPPC64();
590 } else if (cpu.equals("aarch64")) {
591 machDesc = new MachineDescriptionAArch64();
592 } else if (cpu.equals("sparc")) {
593 if (LinuxDebuggerLocal.getAddressSize()==8) {
594 machDesc = new MachineDescriptionSPARC64Bit();
595 } else {
596 machDesc = new MachineDescriptionSPARC32Bit();
597 }
598 } else {
599 try {
600 machDesc = (MachineDescription)
601 Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
602 cpu.toUpperCase()).newInstance();
603 } catch (Exception e) {
604 throw new DebuggerException("Linux not supported on machine type " + cpu);
605 }
606 }
607
608 LinuxDebuggerLocal dbg =
609 new LinuxDebuggerLocal(machDesc, !isServer);
610 debugger = dbg;
611
|
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 package sun.jvm.hotspot;
26
27 import java.rmi.RemoteException;
28 import java.lang.reflect.Constructor;
29 import java.lang.reflect.InvocationTargetException;
30
31 import sun.jvm.hotspot.debugger.Debugger;
32 import sun.jvm.hotspot.debugger.DebuggerException;
33 import sun.jvm.hotspot.debugger.JVMDebugger;
34 import sun.jvm.hotspot.debugger.MachineDescription;
35 import sun.jvm.hotspot.debugger.MachineDescriptionAMD64;
36 import sun.jvm.hotspot.debugger.MachineDescriptionPPC64;
37 import sun.jvm.hotspot.debugger.MachineDescriptionAArch64;
38 import sun.jvm.hotspot.debugger.MachineDescriptionArm;
39 import sun.jvm.hotspot.debugger.MachineDescriptionIntelX86;
40 import sun.jvm.hotspot.debugger.MachineDescriptionSPARC32Bit;
41 import sun.jvm.hotspot.debugger.MachineDescriptionSPARC64Bit;
42 import sun.jvm.hotspot.debugger.NoSuchSymbolException;
43 import sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal;
44 import sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal;
45 import sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal;
46 import sun.jvm.hotspot.debugger.remote.RemoteDebugger;
47 import sun.jvm.hotspot.debugger.remote.RemoteDebuggerClient;
48 import sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer;
49 import sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal;
50 import sun.jvm.hotspot.runtime.VM;
51 import sun.jvm.hotspot.types.TypeDataBase;
52 import sun.jvm.hotspot.utilities.PlatformInfo;
53 import sun.jvm.hotspot.utilities.UnsupportedPlatformException;
54
55 /** <P> This class wraps much of the basic functionality and is the
56 * highest-level factory for VM data structures. It makes it simple
57 * to start up the debugging system. </P>
58 *
573
574 private void setupJVMLibNamesWin32() {
575 jvmLibNames = new String[] { "jvm.dll" };
576 }
577
578 //
579 // Linux
580 //
581
582 private void setupDebuggerLinux() {
583 setupJVMLibNamesLinux();
584
585 if (cpu.equals("x86")) {
586 machDesc = new MachineDescriptionIntelX86();
587 } else if (cpu.equals("amd64")) {
588 machDesc = new MachineDescriptionAMD64();
589 } else if (cpu.equals("ppc64")) {
590 machDesc = new MachineDescriptionPPC64();
591 } else if (cpu.equals("aarch64")) {
592 machDesc = new MachineDescriptionAArch64();
593 } else if (cpu.equals("arm")) {
594 machDesc = new MachineDescriptionArm();
595 } else if (cpu.equals("sparc")) {
596 if (LinuxDebuggerLocal.getAddressSize()==8) {
597 machDesc = new MachineDescriptionSPARC64Bit();
598 } else {
599 machDesc = new MachineDescriptionSPARC32Bit();
600 }
601 } else {
602 try {
603 machDesc = (MachineDescription)
604 Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
605 cpu.toUpperCase()).newInstance();
606 } catch (Exception e) {
607 throw new DebuggerException("Linux not supported on machine type " + cpu);
608 }
609 }
610
611 LinuxDebuggerLocal dbg =
612 new LinuxDebuggerLocal(machDesc, !isServer);
613 debugger = dbg;
614
|