8002118: WindbgDebuggerLocal should not try to load 64-bit debug libraries for 32-bit JVM
Reviewed-by: sspitsyn, zgu
Contributed-by: peter.allwin@oracle.com
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java Sun Mar 31 21:43:10 2013 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java Thu Mar 28 15:39:52 2013 +0100
@@ -572,9 +572,14 @@
DTFWHome = sysRoot + File.separator + ".." + File.separator +
"Program Files" + File.separator + "Debugging Tools For Windows";
searchList.add(DTFWHome);
- searchList.add(DTFWHome + " (x86)");
- searchList.add(DTFWHome + " (x64)");
+ // Only add the search path for the current CPU architecture:
+ String cpu = PlatformInfo.getCPU();
+ if (cpu.equals("x86")) {
+ searchList.add(DTFWHome + " (x86)");
+ } else if (cpu.equals("amd64")) {
+ searchList.add(DTFWHome + " (x64)");
+ }
// The last place to search is the system directory:
searchList.add(sysRoot + File.separator + "system32");
}