54 machDesc = remoteDebugger.getMachineDescription();
55 utils = new DebuggerUtilities(machDesc.getAddressSize(), machDesc.isBigEndian());
56 int cacheNumPages;
57 int cachePageSize;
58 String cpu = remoteDebugger.getCPU();
59 // page size. (FIXME: should pick this up from the remoteDebugger.)
60 if (cpu.equals("sparc")) {
61 threadFactory = new RemoteSPARCThreadFactory(this);
62 cachePageSize = 8192;
63 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
64 } else if (cpu.equals("x86")) {
65 threadFactory = new RemoteX86ThreadFactory(this);
66 cachePageSize = 4096;
67 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
68 unalignedAccessesOkay = true;
69 } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
70 threadFactory = new RemoteAMD64ThreadFactory(this);
71 cachePageSize = 4096;
72 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
73 unalignedAccessesOkay = true;
74 } else if (cpu.equals("ppc64")) {
75 threadFactory = new RemotePPC64ThreadFactory(this);
76 cachePageSize = 4096;
77 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
78 unalignedAccessesOkay = true;
79 } else {
80 try {
81 Class tf = Class.forName("sun.jvm.hotspot.debugger.remote." +
82 cpu.toLowerCase() + ".Remote" + cpu.toUpperCase() +
83 "ThreadFactory");
84 Constructor[] ctf = tf.getConstructors();
85 threadFactory = (RemoteThreadFactory)ctf[0].newInstance(this);
86 } catch (Exception e) {
87 throw new DebuggerException("Thread access for CPU architecture " + cpu + " not yet supported");
88 }
89 cachePageSize = 4096;
90 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
91 unalignedAccessesOkay = false;
92 }
93
94 // Cache portion of the remote process's address space.
|
54 machDesc = remoteDebugger.getMachineDescription();
55 utils = new DebuggerUtilities(machDesc.getAddressSize(), machDesc.isBigEndian());
56 int cacheNumPages;
57 int cachePageSize;
58 String cpu = remoteDebugger.getCPU();
59 // page size. (FIXME: should pick this up from the remoteDebugger.)
60 if (cpu.equals("sparc")) {
61 threadFactory = new RemoteSPARCThreadFactory(this);
62 cachePageSize = 8192;
63 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
64 } else if (cpu.equals("x86")) {
65 threadFactory = new RemoteX86ThreadFactory(this);
66 cachePageSize = 4096;
67 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
68 unalignedAccessesOkay = true;
69 } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
70 threadFactory = new RemoteAMD64ThreadFactory(this);
71 cachePageSize = 4096;
72 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
73 unalignedAccessesOkay = true;
74 } else if (cpu.equals("ppc64") || cpu.equals("ppc64le")) {
75 threadFactory = new RemotePPC64ThreadFactory(this);
76 cachePageSize = 4096;
77 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
78 unalignedAccessesOkay = true;
79 } else {
80 try {
81 Class tf = Class.forName("sun.jvm.hotspot.debugger.remote." +
82 cpu.toLowerCase() + ".Remote" + cpu.toUpperCase() +
83 "ThreadFactory");
84 Constructor[] ctf = tf.getConstructors();
85 threadFactory = (RemoteThreadFactory)ctf[0].newInstance(this);
86 } catch (Exception e) {
87 throw new DebuggerException("Thread access for CPU architecture " + cpu + " not yet supported");
88 }
89 cachePageSize = 4096;
90 cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
91 unalignedAccessesOkay = false;
92 }
93
94 // Cache portion of the remote process's address space.
|