--- a/src/hotspot/os/windows/os_windows.cpp Thu Oct 19 14:36:40 2017 +0200
+++ b/src/hotspot/os/windows/os_windows.cpp Wed Sep 20 15:12:11 2017 +0200
@@ -74,6 +74,7 @@
#include "utilities/growableArray.hpp"
#include "utilities/macros.hpp"
#include "utilities/vmError.hpp"
+#include "symbolengine.hpp"
#include "windbghelp.hpp"
@@ -134,6 +135,8 @@
if (ForceTimeHighResolution) {
timeBeginPeriod(1L);
}
+ WindowsDbgHelp::pre_initialize();
+ SymbolEngine::pre_initialize();
break;
case DLL_PROCESS_DETACH:
if (ForceTimeHighResolution) {
@@ -1319,6 +1322,8 @@
void * os::dll_load(const char *name, char *ebuf, int ebuflen) {
void * result = LoadLibrary(name);
if (result != NULL) {
+ // Recalculate pdb search path if a DLL was loaded successfully.
+ SymbolEngine::recalc_search_path();
return result;
}
@@ -4032,6 +4037,8 @@
return JNI_ERR;
}
+ SymbolEngine::recalc_search_path();
+
return JNI_OK;
}