changeset 6469:4766a2df3115

8043264: hsdis library not picked up correctly on expected paths Summary: Fix file separator issue on Windows Reviewed-by: sla, sspitsyn Contributed-by: krismo@azulsystems.com
author sspitsyn
date Sat, 17 May 2014 01:59:43 -0700
parents 06bfb8cd7b78
children e4d54c03efe7
files src/share/vm/compiler/disassembler.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/compiler/disassembler.cpp	Fri May 16 15:05:44 2014 -0700
+++ b/src/share/vm/compiler/disassembler.cpp	Sat May 17 01:59:43 2014 -0700
@@ -86,7 +86,7 @@
   {
     // Match "jvm[^/]*" in jvm_path.
     const char* base = buf;
-    const char* p = strrchr(buf, '/');
+    const char* p = strrchr(buf, *os::file_separator());
     if (p != NULL) lib_offset = p - base + 1;
     p = strstr(p ? p : base, "jvm");
     if (p != NULL)  jvm_offset = p - base;
@@ -111,7 +111,7 @@
     if (_library == NULL) {
       // 3. <home>/jre/lib/<arch>/hsdis-<arch>.so
       buf[lib_offset - 1] = '\0';
-      const char* p = strrchr(buf, '/');
+      const char* p = strrchr(buf, *os::file_separator());
       if (p != NULL) {
         lib_offset = p - buf + 1;
         strcpy(&buf[lib_offset], hsdis_library_name);