8002118: WindbgDebuggerLocal should not try to load 64-bit debug libraries for 32-bit JVM
authorsla
Thu, 28 Mar 2013 15:39:52 +0100
changeset 16600 a841e8d2362a
parent 16599 09e39436637f
child 16601 7c6db0c8952f
child 16602 5df51d3bc550
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
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java
--- 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");
     }