954 if (_MiniDumpWriteDump == NULL) { |
954 if (_MiniDumpWriteDump == NULL) { |
955 VMError::report_coredump_status("Failed to find MiniDumpWriteDump() in module dbghelp.dll", false); |
955 VMError::report_coredump_status("Failed to find MiniDumpWriteDump() in module dbghelp.dll", false); |
956 return; |
956 return; |
957 } |
957 } |
958 |
958 |
959 dumpType = (MINIDUMP_TYPE)(MiniDumpWithFullMemory | MiniDumpWithFullMemoryInfo | |
959 dumpType = (MINIDUMP_TYPE)(MiniDumpWithFullMemory | MiniDumpWithHandleData); |
960 MiniDumpWithHandleData | MiniDumpWithThreadInfo | MiniDumpWithUnloadedModules); |
960 |
961 |
961 // Older versions of dbghelp.h doesn't contain all the dumptypes we want, dbghelp.h with |
|
962 // API_VERSION_NUMBER 11 or higher contains the ones we want though |
|
963 #if API_VERSION_NUMBER >= 11 |
|
964 dumpType = (MINIDUMP_TYPE)(dumpType | MiniDumpWithFullMemoryInfo | MiniDumpWithThreadInfo | |
|
965 MiniDumpWithUnloadedModules); |
|
966 #endif |
962 |
967 |
963 cwd = get_current_directory(NULL, 0); |
968 cwd = get_current_directory(NULL, 0); |
964 jio_snprintf(buffer, bufferSize, "%s\\hs_err_pid%u.mdmp",cwd, current_process_id()); |
969 jio_snprintf(buffer, bufferSize, "%s\\hs_err_pid%u.mdmp",cwd, current_process_id()); |
965 dumpFile = CreateFile(buffer, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); |
970 dumpFile = CreateFile(buffer, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); |
966 |
971 |