agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java

Print this page
rev 7258 : 8064611: AARCH64: Changes to HotSpot shared code
Summary: Everything except cpu/ and os_cpu/.
Reviewed-by: kvn


  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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.MachineDescriptionIA64;
  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>


 574 
 575     private void setupJVMLibNamesWin32() {
 576         jvmLibNames = new String[] { "jvm.dll" };
 577     }
 578 
 579     //
 580     // Linux
 581     //
 582 
 583     private void setupDebuggerLinux() {
 584         setupJVMLibNamesLinux();
 585 
 586         if (cpu.equals("x86")) {
 587             machDesc = new MachineDescriptionIntelX86();
 588         } else if (cpu.equals("ia64")) {
 589             machDesc = new MachineDescriptionIA64();
 590         } else if (cpu.equals("amd64")) {
 591             machDesc = new MachineDescriptionAMD64();
 592         } else if (cpu.equals("ppc64")) {
 593             machDesc = new MachineDescriptionPPC64();


 594         } else if (cpu.equals("sparc")) {
 595             if (LinuxDebuggerLocal.getAddressSize()==8) {
 596                     machDesc = new MachineDescriptionSPARC64Bit();
 597             } else {
 598                     machDesc = new MachineDescriptionSPARC32Bit();
 599             }
 600         } else {
 601           try {
 602             machDesc = (MachineDescription)
 603               Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
 604                             cpu.toUpperCase()).newInstance();
 605           } catch (Exception e) {
 606             throw new DebuggerException("Linux not supported on machine type " + cpu);
 607           }
 608         }
 609 
 610         LinuxDebuggerLocal dbg =
 611         new LinuxDebuggerLocal(machDesc, !isServer);
 612         debugger = dbg;
 613 




  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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.MachineDescriptionIA64;
  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>


 575 
 576     private void setupJVMLibNamesWin32() {
 577         jvmLibNames = new String[] { "jvm.dll" };
 578     }
 579 
 580     //
 581     // Linux
 582     //
 583 
 584     private void setupDebuggerLinux() {
 585         setupJVMLibNamesLinux();
 586 
 587         if (cpu.equals("x86")) {
 588             machDesc = new MachineDescriptionIntelX86();
 589         } else if (cpu.equals("ia64")) {
 590             machDesc = new MachineDescriptionIA64();
 591         } else if (cpu.equals("amd64")) {
 592             machDesc = new MachineDescriptionAMD64();
 593         } else if (cpu.equals("ppc64")) {
 594             machDesc = new MachineDescriptionPPC64();
 595         } else if (cpu.equals("aarch64")) {
 596             machDesc = new MachineDescriptionAArch64();
 597         } else if (cpu.equals("sparc")) {
 598             if (LinuxDebuggerLocal.getAddressSize()==8) {
 599                     machDesc = new MachineDescriptionSPARC64Bit();
 600             } else {
 601                     machDesc = new MachineDescriptionSPARC32Bit();
 602             }
 603         } else {
 604           try {
 605             machDesc = (MachineDescription)
 606               Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
 607                             cpu.toUpperCase()).newInstance();
 608           } catch (Exception e) {
 609             throw new DebuggerException("Linux not supported on machine type " + cpu);
 610           }
 611         }
 612 
 613         LinuxDebuggerLocal dbg =
 614         new LinuxDebuggerLocal(machDesc, !isServer);
 615         debugger = dbg;
 616