Mercurial > hg > graal-compiler
comparison src/os/windows/vm/decoder_windows.cpp @ 3833:b1cbb0907b36
7016797: Hotspot: securely/restrictive load dlls and new API for loading system dlls
Summary: Created Windows Dll wrapped to handle jdk6 and jdk7 platform requirements, also provided more restictive Dll search orders for Windows system Dlls.
Reviewed-by: acorn, dcubed, ohair, alanb
author | zgu |
---|---|
date | Fri, 15 Apr 2011 09:34:43 -0400 |
parents | 2d4762ec74af |
children | d7e3846464d0 |
comparison
equal
deleted
inserted
replaced
3821:8107273fd204 | 3833:b1cbb0907b36 |
---|---|
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "prims/jvm.h" | 26 #include "prims/jvm.h" |
27 #include "runtime/os.hpp" | |
27 #include "utilities/decoder.hpp" | 28 #include "utilities/decoder.hpp" |
28 | 29 |
29 HMODULE Decoder::_dbghelp_handle = NULL; | 30 HMODULE Decoder::_dbghelp_handle = NULL; |
30 bool Decoder::_can_decode_in_vm = false; | 31 bool Decoder::_can_decode_in_vm = false; |
31 pfn_SymGetSymFromAddr64 Decoder::_pfnSymGetSymFromAddr64 = NULL; | 32 pfn_SymGetSymFromAddr64 Decoder::_pfnSymGetSymFromAddr64 = NULL; |
33 | 34 |
34 void Decoder::initialize() { | 35 void Decoder::initialize() { |
35 if (!_initialized) { | 36 if (!_initialized) { |
36 _initialized = true; | 37 _initialized = true; |
37 | 38 |
38 HMODULE handle = ::LoadLibrary("dbghelp.dll"); | 39 HINSTANCE handle = os::win32::load_Windows_dll("dbghelp.dll", NULL, 0); |
39 if (!handle) { | 40 if (!handle) { |
40 _decoder_status = helper_not_found; | 41 _decoder_status = helper_not_found; |
41 return; | 42 return; |
42 } | 43 } |
43 | 44 |