7129724: MAC: Core file location is wrong in crash report

Updated core path location to reflect macosx default

Reviewed-by: dholmes, kamg
This commit is contained in:
Mikael Vidstedt 2012-07-03 17:35:00 -07:00
parent d1080de4ee
commit af253d110d
5 changed files with 45 additions and 5 deletions

View file

@ -5801,3 +5801,14 @@ bool os::is_headless_jre() {
return true;
}
// Get the default path to the core file
// Returns the length of the string
int os::get_core_path(char* buffer, size_t bufferSize) {
int n = jio_snprintf(buffer, bufferSize, "/cores");
// Truncate if theoretical string was longer than bufferSize
n = MIN2(n, (int)bufferSize);
return n;
}