Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Obtaining the CoreCLR DAC DLL for Windows Phone

DZone's Guide to

Obtaining the CoreCLR DAC DLL for Windows Phone

· Performance Zone ·
Free Resource

SignalFx is the only real-time cloud monitoring platform for infrastructure, microservices, and applications. The platform collects metrics and traces across every component in your cloud environment, replacing traditional point tools with a single integrated solution that works across the stack.

Three years ago I blogged about obtaining SOS.dll and mscordacwks.dllindirectly from the Microsoft KB websites in case you only have a dump from the production system but can’t gain access to copy these files over.

(Reminder: SOS.dll is a WinDbg extension for debugging .NET processes and dump files. The DAC, or mscordacwks.dll, is a helper library used by SOS to access the inner workings of a specific CLR version’s data structures. The DAC is also used by ClrMD, a managed library that provides an API replacement for the SOS extension commands.)

It turns out that for Windows Phone applications (using the Windows Phone CoreCLR), there is no official place online where you can find the various CLR versions alongside with SOS and the DAC. In fact, it seems that Microsoft isn’t making SOS.dll for Windows Phone available as part of the phone image, so there is no way for you to put your hands on it. This is also why WinDbg’s !analyze -v command fails to provide any .NET-related information when you open a dump from a .NET Windows Phone application.

Not all is lost, however. First, we still have Visual Studio, which doesn’t need SOS. The Visual Studio dump debugging engine requires only the DAC DLL, which is available on the Microsoft symbol server. Just drop the dump file into Visual Studio and start debugging it.

SIDENOTE: Interestingly, even though the Windows Phone CoreCLR is built for the ARM processor, Microsoft makes available x86 versions of the DAC, so you can use them from your Windows desktop. For example, mscordaccore_x86_arm_4.0.30508.00.dll is the DAC you should use to debug Windows Phone processes using CoreCLR 4.0.30508.

If you need the SOS extension commands which aren’t provided by the Visual Studio dump debugging interface (such as !SyncBlk!ThreadPool,!DumpDomain etc.), you can use ClrMD to build your own replacements of these commands. I have a blog post explaining how to use ClrMD for a couple of scenarios. More on that in a future post.

SignalFx is built on a massively scalable streaming architecture that applies advanced predictive analytics for real-time problem detection. With its NoSample™ distributed tracing capabilities, SignalFx reliably monitors all transactions across microservices, accurately identifying all anomalies. And through data-science-powered directed troubleshooting SignalFx guides the operator to find the root cause of issues in seconds.

Topics:
performance ,coreclr ,.net ,windows phone ,debugging

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}