hotspot/src/os/windows/vm/os_windows.cpp
changeset 8120 647514d55e9d
parent 8119 81eef1b06988
child 8476 7e34c2d4cf9b
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Wed Feb 09 11:08:10 2011 +0100
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Thu Feb 10 12:55:56 2011 +0100
@@ -956,9 +956,14 @@
     return;
   }
 
-  dumpType = (MINIDUMP_TYPE)(MiniDumpWithFullMemory | MiniDumpWithFullMemoryInfo |
-    MiniDumpWithHandleData | MiniDumpWithThreadInfo | MiniDumpWithUnloadedModules);
-
+  dumpType = (MINIDUMP_TYPE)(MiniDumpWithFullMemory | MiniDumpWithHandleData);
+
+// Older versions of dbghelp.h doesn't contain all the dumptypes we want, dbghelp.h with
+// API_VERSION_NUMBER 11 or higher contains the ones we want though
+#if API_VERSION_NUMBER >= 11
+  dumpType = (MINIDUMP_TYPE)(dumpType | MiniDumpWithFullMemoryInfo | MiniDumpWithThreadInfo |
+    MiniDumpWithUnloadedModules);
+#endif
 
   cwd = get_current_directory(NULL, 0);
   jio_snprintf(buffer, bufferSize, "%s\\hs_err_pid%u.mdmp",cwd, current_process_id());