提交 88e2a0d5 编写于 作者: N nloodin

7163117: Agent can't connect to process on Mac OSX

Reviewed-by: dholmes, coleenp, sla, minqi, kvn
上级 51827823
...@@ -572,10 +572,10 @@ public class HotSpotAgent { ...@@ -572,10 +572,10 @@ public class HotSpotAgent {
if (cpu.equals("x86")) { if (cpu.equals("x86")) {
machDesc = new MachineDescriptionIntelX86(); machDesc = new MachineDescriptionIntelX86();
} else if (cpu.equals("amd64")) { } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
machDesc = new MachineDescriptionAMD64(); machDesc = new MachineDescriptionAMD64();
} else { } else {
throw new DebuggerException("BSD only supported on x86/amd64"); throw new DebuggerException("BSD only supported on x86/x86_64. Current arch: " + cpu);
} }
BsdDebuggerLocal dbg = new BsdDebuggerLocal(machDesc, !isServer); BsdDebuggerLocal dbg = new BsdDebuggerLocal(machDesc, !isServer);
......
...@@ -762,10 +762,10 @@ public class BugSpotAgent { ...@@ -762,10 +762,10 @@ public class BugSpotAgent {
if (cpu.equals("x86")) { if (cpu.equals("x86")) {
machDesc = new MachineDescriptionIntelX86(); machDesc = new MachineDescriptionIntelX86();
} else if (cpu.equals("amd64")) { } else if (cpu.equals("amd64") || (cpu.equals("x86_64"))) {
machDesc = new MachineDescriptionAMD64(); machDesc = new MachineDescriptionAMD64();
} else { } else {
throw new DebuggerException("Bsd only supported on x86/amd64"); throw new DebuggerException("Bsd only supported on x86/x86_64. Current arch: " + cpu);
} }
// Note we do not use a cache for the local debugger in server // Note we do not use a cache for the local debugger in server
......
...@@ -90,7 +90,7 @@ class BsdCDebugger implements CDebugger { ...@@ -90,7 +90,7 @@ class BsdCDebugger implements CDebugger {
Address pc = context.getRegisterAsAddress(X86ThreadContext.EIP); Address pc = context.getRegisterAsAddress(X86ThreadContext.EIP);
if (pc == null) return null; if (pc == null) return null;
return new BsdX86CFrame(dbg, ebp, pc); return new BsdX86CFrame(dbg, ebp, pc);
} else if (cpu.equals("amd64")) { } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
AMD64ThreadContext context = (AMD64ThreadContext) thread.getContext(); AMD64ThreadContext context = (AMD64ThreadContext) thread.getContext();
Address rbp = context.getRegisterAsAddress(AMD64ThreadContext.RBP); Address rbp = context.getRegisterAsAddress(AMD64ThreadContext.RBP);
if (rbp == null) return null; if (rbp == null) return null;
......
...@@ -33,7 +33,7 @@ class BsdThreadContextFactory { ...@@ -33,7 +33,7 @@ class BsdThreadContextFactory {
String cpu = dbg.getCPU(); String cpu = dbg.getCPU();
if (cpu.equals("x86")) { if (cpu.equals("x86")) {
return new BsdX86ThreadContext(dbg); return new BsdX86ThreadContext(dbg);
} else if (cpu.equals("amd64")) { } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
return new BsdAMD64ThreadContext(dbg); return new BsdAMD64ThreadContext(dbg);
} else { } else {
throw new RuntimeException("cpu " + cpu + " is not yet supported"); throw new RuntimeException("cpu " + cpu + " is not yet supported");
......
...@@ -81,7 +81,7 @@ public class ProcDebuggerLocal extends DebuggerBase implements ProcDebugger { ...@@ -81,7 +81,7 @@ public class ProcDebuggerLocal extends DebuggerBase implements ProcDebugger {
pcRegIndex = X86ThreadContext.EIP; pcRegIndex = X86ThreadContext.EIP;
fpRegIndex = X86ThreadContext.EBP; fpRegIndex = X86ThreadContext.EBP;
unalignedAccessesOkay = true; unalignedAccessesOkay = true;
} else if (cpu.equals("amd64")) { } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
threadFactory = new ProcAMD64ThreadFactory(this); threadFactory = new ProcAMD64ThreadFactory(this);
pcRegIndex = AMD64ThreadContext.RIP; pcRegIndex = AMD64ThreadContext.RIP;
fpRegIndex = AMD64ThreadContext.RBP; fpRegIndex = AMD64ThreadContext.RBP;
......
...@@ -64,7 +64,7 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger { ...@@ -64,7 +64,7 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger {
cachePageSize = 4096; cachePageSize = 4096;
cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize); cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
unalignedAccessesOkay = true; unalignedAccessesOkay = true;
} else if (cpu.equals("amd64")) { } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
threadFactory = new RemoteAMD64ThreadFactory(this); threadFactory = new RemoteAMD64ThreadFactory(this);
cachePageSize = 4096; cachePageSize = 4096;
cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize); cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
......
...@@ -95,7 +95,7 @@ public class Threads { ...@@ -95,7 +95,7 @@ public class Threads {
} else if (os.equals("bsd")) { } else if (os.equals("bsd")) {
if (cpu.equals("x86")) { if (cpu.equals("x86")) {
access = new BsdX86JavaThreadPDAccess(); access = new BsdX86JavaThreadPDAccess();
} else if (cpu.equals("amd64")) { } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
access = new BsdAMD64JavaThreadPDAccess(); access = new BsdAMD64JavaThreadPDAccess();
} }
} }
......
...@@ -199,7 +199,7 @@ public class HTMLGenerator implements /* imports */ ClassConstants { ...@@ -199,7 +199,7 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
cpuHelper = new SPARCHelper(); cpuHelper = new SPARCHelper();
} else if (cpu.equals("x86")) { } else if (cpu.equals("x86")) {
cpuHelper = new X86Helper(); cpuHelper = new X86Helper();
} else if (cpu.equals("amd64")) { } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
cpuHelper = new AMD64Helper(); cpuHelper = new AMD64Helper();
} else if (cpu.equals("ia64")) { } else if (cpu.equals("ia64")) {
cpuHelper = new IA64Helper(); cpuHelper = new IA64Helper();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册