diff options
author | Eugene Zemtsov <e.zemtsov@gmail.com> | 2015-03-24 16:48:01 -0700 |
---|---|---|
committer | Eugene Zemtsov <e.zemtsov@gmail.com> | 2015-03-24 16:48:01 -0700 |
commit | 376834692a706f091ecf2b4efafe6d644102b621 (patch) | |
tree | 5a96833b119fe1430c8850c70a8467d9dcf14528 /src/debug/di | |
parent | 407a89c809329f947643d9726ce38aeda711c7c0 (diff) | |
parent | 605c23a32aa0389cab0c209bc882017bc6b88f98 (diff) | |
download | coreclr-376834692a706f091ecf2b4efafe6d644102b621.tar.gz coreclr-376834692a706f091ecf2b4efafe6d644102b621.tar.bz2 coreclr-376834692a706f091ecf2b4efafe6d644102b621.zip |
Merge pull request #553 from Djuffin/dbi-linux
Various DBI related fixes that make it possible to load DBI on Linux
Diffstat (limited to 'src/debug/di')
-rw-r--r-- | src/debug/di/cordb.cpp | 30 | ||||
-rw-r--r-- | src/debug/di/shimprocess.cpp | 10 | ||||
-rw-r--r-- | src/debug/di/stdafx.h | 5 |
3 files changed, 33 insertions, 12 deletions
diff --git a/src/debug/di/cordb.cpp b/src/debug/di/cordb.cpp index 04f3099b44..6df58bdd01 100644 --- a/src/debug/di/cordb.cpp +++ b/src/debug/di/cordb.cpp @@ -174,17 +174,6 @@ STDAPI CoreCLRCreateCordbObject(int iDebuggerVersion, DWORD pid, HMODULE hmodTar //***************************************************************************** BOOL WINAPI DbgDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { -#if defined(_DEBUG) - static int BreakOnDILoad = -1; - if (BreakOnDILoad == -1) - BreakOnDILoad = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_BreakOnDILoad); - - if (BreakOnDILoad) - { - _ASSERTE(!"DI Loaded"); - } -#endif - // Save off the instance handle for later use. switch (dwReason) { @@ -193,6 +182,25 @@ BOOL WINAPI DbgDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { g_hInst = hInstance; +#ifdef FEATURE_PAL + int err = PAL_InitializeDLL(); + if(err != 0) + { + return FALSE; + } +#endif + +#if defined(_DEBUG) + static int BreakOnDILoad = -1; + if (BreakOnDILoad == -1) + BreakOnDILoad = CLRConfig::GetConfigValue(CLRConfig::INTERNAL_BreakOnDILoad); + + if (BreakOnDILoad) + { + _ASSERTE(!"DI Loaded"); + } +#endif + #if defined(LOGGING) { WCHAR rcFile[_MAX_PATH]; diff --git a/src/debug/di/shimprocess.cpp b/src/debug/di/shimprocess.cpp index 39d41ddac9..f4f4407e3b 100644 --- a/src/debug/di/shimprocess.cpp +++ b/src/debug/di/shimprocess.cpp @@ -1871,9 +1871,16 @@ DWORD ShimProcess::ResolveHostName(ICorDebugRemoteTarget * pRemoteTarget) HMODULE ShimProcess::GetDacModule() { - WCHAR wszAccessDllPath[MAX_PATH]; + HModuleHolder hDacDll; +#ifdef FEATURE_PAL + // For now on Unix we'll just search for DAC in the default location. + // Debugger can always control it by setting LD_LIBRARY_PATH env var. + WCHAR wszAccessDllPath[MAX_PATH] = MAKEDLLNAME_W(W("mscordaccore")); + +#else + WCHAR wszAccessDllPath[MAX_PATH]; // // Load the access DLL from the same directory as the the current CLR Debugging Services DLL. // @@ -1908,6 +1915,7 @@ HMODULE ShimProcess::GetDacModule() { ThrowHR(E_INVALIDARG); } +#endif //!FEATURE_PAL hDacDll.Assign(WszLoadLibrary(wszAccessDllPath)); if (!hDacDll) diff --git a/src/debug/di/stdafx.h b/src/debug/di/stdafx.h index f022cc9389..7be0cccffd 100644 --- a/src/debug/di/stdafx.h +++ b/src/debug/di/stdafx.h @@ -25,11 +25,16 @@ #define RSCONTRACTS #endif + +// In case of FEATURE_DBGIPC_TRANSPORT_DI we use pipe for debugger debugee communication +// and event redirection is not needed. (won't work anyway) +#ifndef FEATURE_DBGIPC_TRANSPORT_DI // Currently, we only can redirect exception events. Since real interop-debugging // neeeds all events, redirection can't work in real-interop. // However, whether we're interop-debugging is determined at runtime, so we always // enable at compile time and then we need a runtime check later. #define ENABLE_EVENT_REDIRECTION_PIPELINE +#endif #include "ex.h" |