8002118: WindbgDebuggerLocal should not try to load 64-bit debug libraries for 32-bit JVM

Thu, 28 Mar 2013 15:39:52 +0100

author
sla
date
Thu, 28 Mar 2013 15:39:52 +0100
changeset 4849
e458120c6e1a
parent 4848
d886ac1dfd36
child 4850
ede380e13960
child 4851
8c03fc47511d

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

agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java file | annotate | diff | comparison | revisions
     1.1 --- a/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java	Sun Mar 31 21:43:10 2013 -0400
     1.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java	Thu Mar 28 15:39:52 2013 +0100
     1.3 @@ -572,9 +572,14 @@
     1.4        DTFWHome = sysRoot + File.separator + ".." + File.separator +
     1.5            "Program Files" + File.separator + "Debugging Tools For Windows";
     1.6        searchList.add(DTFWHome);
     1.7 -      searchList.add(DTFWHome + " (x86)");
     1.8 -      searchList.add(DTFWHome + " (x64)");
     1.9  
    1.10 +      // Only add the search path for the current CPU architecture:
    1.11 +      String cpu = PlatformInfo.getCPU();
    1.12 +      if (cpu.equals("x86")) {
    1.13 +          searchList.add(DTFWHome + " (x86)");
    1.14 +      } else if (cpu.equals("amd64")) {
    1.15 +          searchList.add(DTFWHome + " (x64)");
    1.16 +      }
    1.17        // The last place to search is the system directory:
    1.18        searchList.add(sysRoot + File.separator + "system32");
    1.19      }

mercurial