--- old/src/os/linux/vm/os_linux.cpp 2012-06-26 17:29:44.581067532 -0700 +++ new/src/os/linux/vm/os_linux.cpp 2012-06-26 17:29:44.253231539 -0700 @@ -5447,6 +5447,21 @@ return true; } +// Generate the candidate core paths into the supplied buffer +// Return the number of characters actually generated +int os::get_core_paths(char* buffer, size_t bufferSize) { + static char cwd[O_BUFLEN]; + int n; + + get_current_directory(cwd, sizeof(cwd)); + + n = jio_snprintf(buffer, bufferSize, "%s/core or core.%d", cwd, current_process_id()); + + // Truncate if theoretical string was longer than bufferSize + n = MIN2(n, (int)bufferSize); + + return n; +} #ifdef JAVASE_EMBEDDED //