From 6185b9af8591283c5dbf1711d6064a23602f9760 Mon Sep 17 00:00:00 2001 From: Chris Sienkiewicz Date: Wed, 23 May 2018 10:39:56 -0700 Subject: [PATCH] SOS Fixes for windows arm32 (#18090) --- src/ToolBox/SOS/Strike/strike.cpp | 4 ++-- src/ToolBox/SOS/Strike/util.cpp | 4 ++-- src/ToolBox/SOS/Strike/util.h | 13 +++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp index aaaf39a..5637432 100644 --- a/src/ToolBox/SOS/Strike/strike.cpp +++ b/src/ToolBox/SOS/Strike/strike.cpp @@ -11821,9 +11821,9 @@ public: InternalFrameManager internalFrameManager; IfFailRet(internalFrameManager.Init(pThread3)); - #if defined(_AMD64_) + #if defined(_AMD64_) || defined(_ARM64_) ExtOut("%-16s %-16s %s\n", "Child SP", "IP", "Call Site"); - #elif defined(_X86_) + #elif defined(_X86_) || defined(_ARM_) ExtOut("%-8s %-8s %s\n", "Child SP", "IP", "Call Site"); #endif diff --git a/src/ToolBox/SOS/Strike/util.cpp b/src/ToolBox/SOS/Strike/util.cpp index 74cbc4c..8c9e584 100644 --- a/src/ToolBox/SOS/Strike/util.cpp +++ b/src/ToolBox/SOS/Strike/util.cpp @@ -6121,12 +6121,12 @@ HRESULT SymbolReader::LoadSymbolsForWindowsPDB(___in IMetaDataImport* pMD, ___in ToRelease pSymBinder; if (FAILED(Status = CreateInstanceCustom(CLSID_CorSymBinder_SxS, IID_ISymUnmanagedBinder3, - W("diasymreader.dll"), + NATIVE_SYMBOL_READER_DLL, cciLatestFx|cciDacColocated|cciDbgPath, (void**)&pSymBinder))) { ExtOut("SOS Error: Unable to CoCreateInstance class=CLSID_CorSymBinder_SxS, interface=IID_ISymUnmanagedBinder3, hr=0x%x\n", Status); - ExtOut("This usually means the installation of .Net Framework on your machine is missing or needs repair\n"); + ExtOut("This usually means SOS was unable to locate a suitable version of DiaSymReader. The dll searched for was '%S'\n", NATIVE_SYMBOL_READER_DLL); return Status; } diff --git a/src/ToolBox/SOS/Strike/util.h b/src/ToolBox/SOS/Strike/util.h index 7ffba1c..0b0b344 100644 --- a/src/ToolBox/SOS/Strike/util.h +++ b/src/ToolBox/SOS/Strike/util.h @@ -82,6 +82,19 @@ struct IMDInternalImport; do { if (!(expr) ) { ExtOut(reason); ExtOut(msg); ExtOut(#expr); DebugBreak(); } } while (0) #endif +// The native symbol reader dll name +#if defined(_AMD64_) +#define NATIVE_SYMBOL_READER_DLL W("Microsoft.DiaSymReader.Native.amd64.dll") +#elif defined(_X86_) +#define NATIVE_SYMBOL_READER_DLL W("Microsoft.DiaSymReader.Native.x86.dll") +#elif defined(_ARM_) +#define NATIVE_SYMBOL_READER_DLL W("Microsoft.DiaSymReader.Native.arm.dll") +#elif defined(_ARM64_) +// Use diasymreader until the package has an arm64 version - issue #7360 +//#define NATIVE_SYMBOL_READER_DLL W("Microsoft.DiaSymReader.Native.arm64.dll") +#define NATIVE_SYMBOL_READER_DLL W("diasymreader.dll") +#endif + // PREFIX macros - Begin // SOS does not have support for Contracts. Therefore we needed to duplicate -- 2.7.4