8043264: hsdis library not picked up correctly on expected paths
Fix file separator issue on Windows Reviewed-by: sla, sspitsyn
This commit is contained in:
parent
7f2b064e43
commit
e8c1213b23
@ -86,7 +86,7 @@ bool Disassembler::load_library() {
|
||||
{
|
||||
// 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 @@ bool Disassembler::load_library() {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user