diff src/os/solaris/vm/os_solaris.cpp @ 6200:65906dc96aa1

7129724: MAC: Core file location is wrong in crash report Summary: Updated core path location to reflect macosx default Reviewed-by: dholmes, kamg
author mikael
date Tue, 03 Jul 2012 17:35:00 -0700
parents d2a62e0f25eb
children 957c266d8bc5 da91efe96a93
line wrap: on
line diff
--- a/src/os/solaris/vm/os_solaris.cpp	Tue Jul 03 01:41:29 2012 -0400
+++ b/src/os/solaris/vm/os_solaris.cpp	Tue Jul 03 17:35:00 2012 -0700
@@ -6537,3 +6537,16 @@
    INTERRUPTIBLE_RETURN_INT_NORESTART(::bind(fd, him, len),\
                                       os::Solaris::clear_interrupted);
 }
+
+// Get the default path to the core file
+// Returns the length of the string
+int os::get_core_path(char* buffer, size_t bufferSize) {
+  const char* p = get_current_directory(buffer, bufferSize);
+
+  if (p == NULL) {
+    assert(p != NULL, "failed to get current directory");
+    return 0;
+  }
+
+  return strlen(buffer);
+}