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

Reviewed-by: dholmes, coleenp, sla, minqi, kvn
This commit is contained in:
Nils Loodin 2012-05-09 16:24:07 +02:00
parent 26eeb59d8d
commit 018f4098e8
8 changed files with 10 additions and 10 deletions

View File

@ -572,10 +572,10 @@ public class HotSpotAgent {
if (cpu.equals("x86")) {
machDesc = new MachineDescriptionIntelX86();
} else if (cpu.equals("amd64")) {
} else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
machDesc = new MachineDescriptionAMD64();
} 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);

View File

@ -762,10 +762,10 @@ public class BugSpotAgent {
if (cpu.equals("x86")) {
machDesc = new MachineDescriptionIntelX86();
} else if (cpu.equals("amd64")) {
} else if (cpu.equals("amd64") || (cpu.equals("x86_64"))) {
machDesc = new MachineDescriptionAMD64();
} 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

View File

@ -90,7 +90,7 @@ class BsdCDebugger implements CDebugger {
Address pc = context.getRegisterAsAddress(X86ThreadContext.EIP);
if (pc == null) return null;
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();
Address rbp = context.getRegisterAsAddress(AMD64ThreadContext.RBP);
if (rbp == null) return null;

View File

@ -33,7 +33,7 @@ class BsdThreadContextFactory {
String cpu = dbg.getCPU();
if (cpu.equals("x86")) {
return new BsdX86ThreadContext(dbg);
} else if (cpu.equals("amd64")) {
} else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
return new BsdAMD64ThreadContext(dbg);
} else {
throw new RuntimeException("cpu " + cpu + " is not yet supported");

View File

@ -81,7 +81,7 @@ public class ProcDebuggerLocal extends DebuggerBase implements ProcDebugger {
pcRegIndex = X86ThreadContext.EIP;
fpRegIndex = X86ThreadContext.EBP;
unalignedAccessesOkay = true;
} else if (cpu.equals("amd64")) {
} else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
threadFactory = new ProcAMD64ThreadFactory(this);
pcRegIndex = AMD64ThreadContext.RIP;
fpRegIndex = AMD64ThreadContext.RBP;

View File

@ -64,7 +64,7 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger {
cachePageSize = 4096;
cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);
unalignedAccessesOkay = true;
} else if (cpu.equals("amd64")) {
} else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
threadFactory = new RemoteAMD64ThreadFactory(this);
cachePageSize = 4096;
cacheNumPages = parseCacheNumPagesProperty(cacheSize / cachePageSize);

View File

@ -95,7 +95,7 @@ public class Threads {
} else if (os.equals("bsd")) {
if (cpu.equals("x86")) {
access = new BsdX86JavaThreadPDAccess();
} else if (cpu.equals("amd64")) {
} else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
access = new BsdAMD64JavaThreadPDAccess();
}
}

View File

@ -199,7 +199,7 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
cpuHelper = new SPARCHelper();
} else if (cpu.equals("x86")) {
cpuHelper = new X86Helper();
} else if (cpu.equals("amd64")) {
} else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
cpuHelper = new AMD64Helper();
} else if (cpu.equals("ia64")) {
cpuHelper = new IA64Helper();