From: Steve MacLean Date: Fri, 17 Apr 2020 20:05:50 +0000 (-0400) Subject: Cross dbi (#1036) X-Git-Tag: submit/tizen_5.5/20200504.045052~7^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=505284c138bd407c5b79b36735df001d612e30f7;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Cross dbi (#1036) * Fix dotnet-dump analyze regression * Fix CLRDebuggingImpl::GetCLRInfo() * Fix CLRDebuggingImpl::GetPlatform() * Fix FEATURE_PAL builds --- diff --git a/src/SOS/Strike/cordebugdatatarget.h b/src/SOS/Strike/cordebugdatatarget.h index fe5bece3a..3a9bbd4cd 100644 --- a/src/SOS/Strike/cordebugdatatarget.h +++ b/src/SOS/Strike/cordebugdatatarget.h @@ -74,27 +74,32 @@ public: virtual HRESULT STDMETHODCALLTYPE GetPlatform(CorDebugPlatform * pPlatform) { ULONG platformKind = g_targetMachine->GetPlatform(); -#ifdef FEATURE_PAL - if(platformKind == IMAGE_FILE_MACHINE_I386) - *pPlatform = CORDB_PLATFORM_POSIX_X86; - else if(platformKind == IMAGE_FILE_MACHINE_AMD64) - *pPlatform = CORDB_PLATFORM_POSIX_AMD64; - else if(platformKind == IMAGE_FILE_MACHINE_ARMNT) - *pPlatform = CORDB_PLATFORM_POSIX_ARM; - else - return E_FAIL; -#else - if(platformKind == IMAGE_FILE_MACHINE_I386) - *pPlatform = CORDB_PLATFORM_WINDOWS_X86; - else if(platformKind == IMAGE_FILE_MACHINE_AMD64) - *pPlatform = CORDB_PLATFORM_WINDOWS_AMD64; - else if(platformKind == IMAGE_FILE_MACHINE_ARMNT) - *pPlatform = CORDB_PLATFORM_WINDOWS_ARM; - else if(platformKind == IMAGE_FILE_MACHINE_ARM64) - *pPlatform = CORDB_PLATFORM_WINDOWS_ARM64; + if (IsWindowsTarget()) + { + if (platformKind == IMAGE_FILE_MACHINE_I386) + *pPlatform = CORDB_PLATFORM_WINDOWS_X86; + else if (platformKind == IMAGE_FILE_MACHINE_AMD64) + *pPlatform = CORDB_PLATFORM_WINDOWS_AMD64; + else if (platformKind == IMAGE_FILE_MACHINE_ARMNT) + *pPlatform = CORDB_PLATFORM_WINDOWS_ARM; + else if (platformKind == IMAGE_FILE_MACHINE_ARM64) + *pPlatform = CORDB_PLATFORM_WINDOWS_ARM64; + else + return E_FAIL; + } else - return E_FAIL; -#endif + { + if (platformKind == IMAGE_FILE_MACHINE_I386) + *pPlatform = CORDB_PLATFORM_POSIX_X86; + else if (platformKind == IMAGE_FILE_MACHINE_AMD64) + *pPlatform = CORDB_PLATFORM_POSIX_AMD64; + else if (platformKind == IMAGE_FILE_MACHINE_ARMNT) + *pPlatform = CORDB_PLATFORM_POSIX_ARM; + else if (platformKind == IMAGE_FILE_MACHINE_ARM64) + *pPlatform = CORDB_PLATFORM_POSIX_ARM64; + else + return E_FAIL; + } return S_OK; } diff --git a/src/SOS/Strike/runtime.cpp b/src/SOS/Strike/runtime.cpp index 940863c20..2645bf983 100644 --- a/src/SOS/Strike/runtime.cpp +++ b/src/SOS/Strike/runtime.cpp @@ -477,7 +477,7 @@ HRESULT Runtime::GetCorDebugInterface(ICorDebugProcess** ppCorDebugProcess) skuId = CLR_ID_V4_DESKTOP; } #endif - CLRDebuggingImpl* pDebuggingImpl = new CLRDebuggingImpl(skuId); + CLRDebuggingImpl* pDebuggingImpl = new CLRDebuggingImpl(skuId, IsWindowsTarget()); hr = pDebuggingImpl->QueryInterface(IID_ICLRDebugging, (LPVOID *)&pClrDebugging); if (FAILED(hr)) { diff --git a/src/SOS/debugshim/debugshim.cpp b/src/SOS/debugshim/debugshim.cpp index 828cbfeef..f23d25d24 100644 --- a/src/SOS/debugshim/debugshim.cpp +++ b/src/SOS/debugshim/debugshim.cpp @@ -423,192 +423,197 @@ HRESULT CLRDebuggingImpl::GetCLRInfo(ICorDebugDataTarget* pDataTarget, DWORD dwDacNameCharCount) { #ifndef FEATURE_PAL - WORD imageFileMachine = 0; - DWORD resourceSectionRVA = 0; - HRESULT hr = GetMachineAndResourceSectionRVA(pDataTarget, moduleBaseAddress, &imageFileMachine, &resourceSectionRVA); - - // We want the version resource which has type = RT_VERSION = 16, name = 1, language = 0x409 - DWORD versionResourceRVA = 0; - DWORD versionResourceSize = 0; - if(SUCCEEDED(hr)) + if (m_isWindowsTarget) { - hr = GetResourceRvaFromResourceSectionRva(pDataTarget, moduleBaseAddress, resourceSectionRVA, 16, 1, 0x409, - &versionResourceRVA, &versionResourceSize); - } + WORD imageFileMachine = 0; + DWORD resourceSectionRVA = 0; + HRESULT hr = GetMachineAndResourceSectionRVA(pDataTarget, moduleBaseAddress, &imageFileMachine, &resourceSectionRVA); - // At last we get our version info - VS_FIXEDFILEINFO fixedFileInfo = {0}; - if(SUCCEEDED(hr)) - { - // The version resource has 3 words, then the unicode string "VS_VERSION_INFO" - // (16 WCHARS including the null terminator) - // then padding to a 32-bit boundary, then the VS_FIXEDFILEINFO struct - DWORD fixedFileInfoRVA = ((versionResourceRVA + 3*2 + 16*2 + 3)/4)*4; - hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + fixedFileInfoRVA, (BYTE*)&fixedFileInfo, sizeof(fixedFileInfo)); - } + // We want the version resource which has type = RT_VERSION = 16, name = 1, language = 0x409 + DWORD versionResourceRVA = 0; + DWORD versionResourceSize = 0; + if(SUCCEEDED(hr)) + { + hr = GetResourceRvaFromResourceSectionRva(pDataTarget, moduleBaseAddress, resourceSectionRVA, 16, 1, 0x409, + &versionResourceRVA, &versionResourceSize); + } - //Verify the signature on the version resource - if(SUCCEEDED(hr) && fixedFileInfo.dwSignature != PE_FIXEDFILEINFO_SIGNATURE) - { - hr = CORDBG_E_NOT_CLR; - } + // At last we get our version info + VS_FIXEDFILEINFO fixedFileInfo = {0}; + if(SUCCEEDED(hr)) + { + // The version resource has 3 words, then the unicode string "VS_VERSION_INFO" + // (16 WCHARS including the null terminator) + // then padding to a 32-bit boundary, then the VS_FIXEDFILEINFO struct + DWORD fixedFileInfoRVA = ((versionResourceRVA + 3*2 + 16*2 + 3)/4)*4; + hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + fixedFileInfoRVA, (BYTE*)&fixedFileInfo, sizeof(fixedFileInfo)); + } - // Record the version information - if(SUCCEEDED(hr)) - { - pVersion->wMajor = (WORD) (fixedFileInfo.dwProductVersionMS >> 16); - pVersion->wMinor = (WORD) (fixedFileInfo.dwProductVersionMS & 0xFFFF); - pVersion->wBuild = (WORD) (fixedFileInfo.dwProductVersionLS >> 16); - pVersion->wRevision = (WORD) (fixedFileInfo.dwProductVersionLS & 0xFFFF); - } + //Verify the signature on the version resource + if(SUCCEEDED(hr) && fixedFileInfo.dwSignature != PE_FIXEDFILEINFO_SIGNATURE) + { + hr = CORDBG_E_NOT_CLR; + } - // Now grab the special clr debug info resource - // We may need to scan a few different names searching though... - // 1) CLRDEBUGINFO where host_os = 'WINDOWS' or 'CORESYS' and host_arch = 'X86' or 'ARM' or 'AMD64' - // 2) For back-compat if the host os is windows and the host architecture matches the target then CLRDEBUGINFO is used with no suffix. - DWORD debugResourceRVA = 0; - DWORD debugResourceSize = 0; - BOOL useCrossPlatformNaming = FALSE; - if(SUCCEEDED(hr)) - { - // the initial state is that we haven't found a proper resource - HRESULT hrGetResource = E_FAIL; + // Record the version information + if(SUCCEEDED(hr)) + { + pVersion->wMajor = (WORD) (fixedFileInfo.dwProductVersionMS >> 16); + pVersion->wMinor = (WORD) (fixedFileInfo.dwProductVersionMS & 0xFFFF); + pVersion->wBuild = (WORD) (fixedFileInfo.dwProductVersionLS >> 16); + pVersion->wRevision = (WORD) (fixedFileInfo.dwProductVersionLS & 0xFFFF); + } + + // Now grab the special clr debug info resource + // We may need to scan a few different names searching though... + // 1) CLRDEBUGINFO where host_os = 'WINDOWS' or 'CORESYS' and host_arch = 'X86' or 'ARM' or 'AMD64' + // 2) For back-compat if the host os is windows and the host architecture matches the target then CLRDEBUGINFO is used with no suffix. + DWORD debugResourceRVA = 0; + DWORD debugResourceSize = 0; + BOOL useCrossPlatformNaming = FALSE; + if(SUCCEEDED(hr)) + { + // the initial state is that we haven't found a proper resource + HRESULT hrGetResource = E_FAIL; - // First check for the resource which has type = RC_DATA = 10, name = "CLRDEBUGINFO", language = 0 -#if defined (HOST_IS_WINDOWS_OS) && defined(_HOST_X86_) - const WCHAR * resourceName = W("CLRDEBUGINFOWINDOWSX86"); -#endif + // First check for the resource which has type = RC_DATA = 10, name = "CLRDEBUGINFO", language = 0 + #if defined (HOST_IS_WINDOWS_OS) && defined(_HOST_X86_) + const WCHAR * resourceName = W("CLRDEBUGINFOWINDOWSX86"); + #endif -#if !defined (HOST_IS_WINDOWS_OS) && defined(_HOST_X86_) - const WCHAR * resourceName = W("CLRDEBUGINFOCORESYSX86"); -#endif + #if !defined (HOST_IS_WINDOWS_OS) && defined(_HOST_X86_) + const WCHAR * resourceName = W("CLRDEBUGINFOCORESYSX86"); + #endif -#if defined (HOST_IS_WINDOWS_OS) && defined(_HOST_AMD64_) - const WCHAR * resourceName = W("CLRDEBUGINFOWINDOWSAMD64"); -#endif + #if defined (HOST_IS_WINDOWS_OS) && defined(_HOST_AMD64_) + const WCHAR * resourceName = W("CLRDEBUGINFOWINDOWSAMD64"); + #endif -#if !defined (HOST_IS_WINDOWS_OS) && defined(_HOST_AMD64_) - const WCHAR * resourceName = W("CLRDEBUGINFOCORESYSAMD64"); -#endif + #if !defined (HOST_IS_WINDOWS_OS) && defined(_HOST_AMD64_) + const WCHAR * resourceName = W("CLRDEBUGINFOCORESYSAMD64"); + #endif -#if defined (HOST_IS_WINDOWS_OS) && defined(_HOST_ARM64_) - const WCHAR * resourceName = W("CLRDEBUGINFOWINDOWSARM64"); -#endif + #if defined (HOST_IS_WINDOWS_OS) && defined(_HOST_ARM64_) + const WCHAR * resourceName = W("CLRDEBUGINFOWINDOWSARM64"); + #endif -#if !defined (HOST_IS_WINDOWS_OS) && defined(_HOST_ARM64_) - const WCHAR * resourceName = W("CLRDEBUGINFOCORESYSARM64"); -#endif + #if !defined (HOST_IS_WINDOWS_OS) && defined(_HOST_ARM64_) + const WCHAR * resourceName = W("CLRDEBUGINFOCORESYSARM64"); + #endif -#if defined (HOST_IS_WINDOWS_OS) && defined(_HOST_ARM_) - const WCHAR * resourceName = W("CLRDEBUGINFOWINDOWSARM"); -#endif + #if defined (HOST_IS_WINDOWS_OS) && defined(_HOST_ARM_) + const WCHAR * resourceName = W("CLRDEBUGINFOWINDOWSARM"); + #endif -#if !defined (HOST_IS_WINDOWS_OS) && defined(_HOST_ARM_) - const WCHAR * resourceName = W("CLRDEBUGINFOCORESYSARM"); -#endif + #if !defined (HOST_IS_WINDOWS_OS) && defined(_HOST_ARM_) + const WCHAR * resourceName = W("CLRDEBUGINFOCORESYSARM"); + #endif - hrGetResource = GetResourceRvaFromResourceSectionRvaByName(pDataTarget, moduleBaseAddress, resourceSectionRVA, 10, resourceName, 0, - &debugResourceRVA, &debugResourceSize); - useCrossPlatformNaming = SUCCEEDED(hrGetResource); + hrGetResource = GetResourceRvaFromResourceSectionRvaByName(pDataTarget, moduleBaseAddress, resourceSectionRVA, 10, resourceName, 0, + &debugResourceRVA, &debugResourceSize); + useCrossPlatformNaming = SUCCEEDED(hrGetResource); -#if defined(HOST_IS_WINDOWS_OS) && (defined(_HOST_X86_) || defined(_HOST_AMD64_) || defined(_HOST_ARM_)) - #if defined(_HOST_X86_) - #define _HOST_MACHINE_TYPE IMAGE_FILE_MACHINE_I386 - #elif defined(_HOST_AMD64_) - #define _HOST_MACHINE_TYPE IMAGE_FILE_MACHINE_AMD64 - #elif defined(_HOST_ARM_) - #define _HOST_MACHINE_TYPE IMAGE_FILE_MACHINE_ARMNT - #endif - - // if this is windows, and if host_arch matches target arch then we can fallback to searching for CLRDEBUGINFO on failure - if(FAILED(hrGetResource) && (imageFileMachine == _HOST_MACHINE_TYPE)) - { - hrGetResource = GetResourceRvaFromResourceSectionRvaByName(pDataTarget, moduleBaseAddress, resourceSectionRVA, 10, W("CLRDEBUGINFO"), 0, - &debugResourceRVA, &debugResourceSize); + #if defined(HOST_IS_WINDOWS_OS) && (defined(_HOST_X86_) || defined(_HOST_AMD64_) || defined(_HOST_ARM_)) + #if defined(_HOST_X86_) + #define _HOST_MACHINE_TYPE IMAGE_FILE_MACHINE_I386 + #elif defined(_HOST_AMD64_) + #define _HOST_MACHINE_TYPE IMAGE_FILE_MACHINE_AMD64 + #elif defined(_HOST_ARM_) + #define _HOST_MACHINE_TYPE IMAGE_FILE_MACHINE_ARMNT + #endif + + // if this is windows, and if host_arch matches target arch then we can fallback to searching for CLRDEBUGINFO on failure + if(FAILED(hrGetResource) && (imageFileMachine == _HOST_MACHINE_TYPE)) + { + hrGetResource = GetResourceRvaFromResourceSectionRvaByName(pDataTarget, moduleBaseAddress, resourceSectionRVA, 10, W("CLRDEBUGINFO"), 0, + &debugResourceRVA, &debugResourceSize); + } + + #undef _HOST_MACHINE_TYPE + #endif + // if the search failed, we don't recognize the CLR + if(FAILED(hrGetResource)) + hr = CORDBG_E_NOT_CLR; } - #undef _HOST_MACHINE_TYPE -#endif - // if the search failed, we don't recognize the CLR - if(FAILED(hrGetResource)) + CLR_DEBUG_RESOURCE debugResource; + if(SUCCEEDED(hr) && debugResourceSize != sizeof(debugResource)) + { hr = CORDBG_E_NOT_CLR; - } - - CLR_DEBUG_RESOURCE debugResource; - if(SUCCEEDED(hr) && debugResourceSize != sizeof(debugResource)) - { - hr = CORDBG_E_NOT_CLR; - } + } - // Get the special debug resource from the image and return the results - if(SUCCEEDED(hr)) - { - hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + debugResourceRVA, (BYTE*)&debugResource, sizeof(debugResource)); - } - if(SUCCEEDED(hr) && (debugResource.dwVersion != 0)) - { - hr = CORDBG_E_NOT_CLR; - } + // Get the special debug resource from the image and return the results + if(SUCCEEDED(hr)) + { + hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + debugResourceRVA, (BYTE*)&debugResource, sizeof(debugResource)); + } + if(SUCCEEDED(hr) && (debugResource.dwVersion != 0)) + { + hr = CORDBG_E_NOT_CLR; + } - // The signature needs to match m_skuId exactly, except for m_skuId=CLR_ID_ONECORE_CLR which is - // also compatible with the older CLR_ID_PHONE_CLR signature. - if(SUCCEEDED(hr) && - (debugResource.signature != m_skuId) && - !( (debugResource.signature == CLR_ID_PHONE_CLR) && (m_skuId == CLR_ID_ONECORE_CLR) )) - { - hr = CORDBG_E_NOT_CLR; - } + // The signature needs to match m_skuId exactly, except for m_skuId=CLR_ID_ONECORE_CLR which is + // also compatible with the older CLR_ID_PHONE_CLR signature. + if(SUCCEEDED(hr) && + (debugResource.signature != m_skuId) && + !( (debugResource.signature == CLR_ID_PHONE_CLR) && (m_skuId == CLR_ID_ONECORE_CLR) )) + { + hr = CORDBG_E_NOT_CLR; + } - if(SUCCEEDED(hr) && - (debugResource.signature != CLR_ID_ONECORE_CLR) && - useCrossPlatformNaming) - { - FormatLongDacModuleName(pDacName, dwDacNameCharCount, imageFileMachine, &fixedFileInfo); - swprintf_s(pDbiName, dwDbiNameCharCount, W("%s_%s.dll"), MAIN_DBI_MODULE_NAME_W, W("x86")); - } - else - { - if(m_skuId == CLR_ID_V4_DESKTOP) - swprintf_s(pDacName, dwDacNameCharCount, W("%s.dll"), CLR_DAC_MODULE_NAME_W); + if(SUCCEEDED(hr) && + (debugResource.signature != CLR_ID_ONECORE_CLR) && + useCrossPlatformNaming) + { + FormatLongDacModuleName(pDacName, dwDacNameCharCount, imageFileMachine, &fixedFileInfo); + swprintf_s(pDbiName, dwDbiNameCharCount, W("%s_%s.dll"), MAIN_DBI_MODULE_NAME_W, W("x86")); + } else - swprintf_s(pDacName, dwDacNameCharCount, W("%s.dll"), CORECLR_DAC_MODULE_NAME_W); - swprintf_s(pDbiName, dwDbiNameCharCount, W("%s.dll"), MAIN_DBI_MODULE_NAME_W); - } + { + if(m_skuId == CLR_ID_V4_DESKTOP) + swprintf_s(pDacName, dwDacNameCharCount, W("%s.dll"), CLR_DAC_MODULE_NAME_W); + else + swprintf_s(pDacName, dwDacNameCharCount, W("%s.dll"), CORECLR_DAC_MODULE_NAME_W); + swprintf_s(pDbiName, dwDbiNameCharCount, W("%s.dll"), MAIN_DBI_MODULE_NAME_W); + } - if(SUCCEEDED(hr)) - { - *pdwDbiTimeStamp = debugResource.dwDbiTimeStamp; - *pdwDbiSizeOfImage = debugResource.dwDbiSizeOfImage; - *pdwDacTimeStamp = debugResource.dwDacTimeStamp; - *pdwDacSizeOfImage = debugResource.dwDacSizeOfImage; - } + if(SUCCEEDED(hr)) + { + *pdwDbiTimeStamp = debugResource.dwDbiTimeStamp; + *pdwDbiSizeOfImage = debugResource.dwDbiSizeOfImage; + *pdwDacTimeStamp = debugResource.dwDacTimeStamp; + *pdwDacSizeOfImage = debugResource.dwDacSizeOfImage; + } - // any failure should be interpreted as this module not being a CLR - if(FAILED(hr)) - { - return CORDBG_E_NOT_CLR; + // any failure should be interpreted as this module not being a CLR + if(FAILED(hr)) + { + return CORDBG_E_NOT_CLR; + } + else + { + return S_OK; + } } else +#endif // FEATURE_PAL { - return S_OK; - } -#else - swprintf_s(pDacName, dwDacNameCharCount, W("%s"), MAKEDLLNAME_W(CORECLR_DAC_MODULE_NAME_W)); - swprintf_s(pDbiName, dwDbiNameCharCount, W("%s"), MAKEDLLNAME_W(MAIN_DBI_MODULE_NAME_W)); + swprintf_s(pDacName, dwDacNameCharCount, W("%s"), MAKEDLLNAME_W(CORECLR_DAC_MODULE_NAME_W)); + swprintf_s(pDbiName, dwDbiNameCharCount, W("%s"), MAKEDLLNAME_W(MAIN_DBI_MODULE_NAME_W)); - pVersion->wMajor = 0; - pVersion->wMinor = 0; - pVersion->wBuild = 0; - pVersion->wRevision = 0; + pVersion->wMajor = 0; + pVersion->wMinor = 0; + pVersion->wBuild = 0; + pVersion->wRevision = 0; - *pdwDbiTimeStamp = 0; - *pdwDbiSizeOfImage = 0; - *pdwDacTimeStamp = 0; - *pdwDacSizeOfImage = 0; + *pdwDbiTimeStamp = 0; + *pdwDbiSizeOfImage = 0; + *pdwDacTimeStamp = 0; + *pdwDacSizeOfImage = 0; - return S_OK; -#endif // FEATURE_PAL + return S_OK; + } } // Formats the long name for DAC diff --git a/src/SOS/debugshim/debugshim.h b/src/SOS/debugshim/debugshim.h index c1d917387..7ba42bc37 100644 --- a/src/SOS/debugshim/debugshim.h +++ b/src/SOS/debugshim/debugshim.h @@ -28,7 +28,7 @@ class CLRDebuggingImpl : public ICLRDebugging { public: - CLRDebuggingImpl(GUID skuId) : m_cRef(0), m_skuId(skuId) + CLRDebuggingImpl(GUID skuId, bool isWindowsTarget) : m_cRef(0), m_skuId(skuId), m_isWindowsTarget(isWindowsTarget) { } @@ -84,6 +84,7 @@ private: volatile LONG m_cRef; GUID m_skuId; + bool m_isWindowsTarget; }; // class CLRDebuggingImpl diff --git a/src/Tools/dotnet-dump/Analyzer.cs b/src/Tools/dotnet-dump/Analyzer.cs index f01feec47..91b54c4dc 100644 --- a/src/Tools/dotnet-dump/Analyzer.cs +++ b/src/Tools/dotnet-dump/Analyzer.cs @@ -219,6 +219,15 @@ namespace Microsoft.Diagnostics.Tools.Dump return runtime; } + private string GetPlatformDacFileName(string dacFileName) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return dacFileName.Replace("libmscordaccore.so", "mscordaccore.dll"); + } + return dacFileName; + } + private string GetDacFile(ClrInfo clrInfo) { if (_dacFilePath == null) @@ -228,7 +237,7 @@ namespace Microsoft.Diagnostics.Tools.Dump string dacFilePath = null; if (!string.IsNullOrEmpty(analyzeContext.RuntimeModuleDirectory)) { - dacFilePath = Path.Combine(analyzeContext.RuntimeModuleDirectory, clrInfo.DacInfo.FileName); + dacFilePath = Path.Combine(analyzeContext.RuntimeModuleDirectory, GetPlatformDacFileName(clrInfo.DacInfo.FileName)); if (File.Exists(dacFilePath)) { _dacFilePath = dacFilePath; @@ -236,14 +245,14 @@ namespace Microsoft.Diagnostics.Tools.Dump } if (_dacFilePath == null) { - dacFilePath = clrInfo.LocalMatchingDac; + dacFilePath = GetPlatformDacFileName(clrInfo.LocalMatchingDac); if (!string.IsNullOrEmpty(dacFilePath) && File.Exists(dacFilePath)) { _dacFilePath = dacFilePath; } else if (SymbolReader.IsSymbolStoreEnabled()) { - string dacFileName = Path.GetFileName(dacFilePath ?? clrInfo.DacInfo.FileName); + string dacFileName = Path.GetFileName(dacFilePath ?? GetPlatformDacFileName(clrInfo.DacInfo.FileName)); if (dacFileName != null) { SymbolStoreKey key = null;