Get the correct .net custom characters for Windbg

I am debugging a dump on failure, where I am looking for a dump taken from a production server. The machine on which I am running WinDbg must have a slightly different version of the .NET runtime installed. I get errors when loading my own images of .NET system assemblies (so loading, for example, System.Data.Linq ) is impossible.

What is the best way to ensure that my debug computer has access to all the correct characters?

Edit Added lmv output for Thomas Weller

 000007fb`68660000 000007fb`68993000 System_Data_Linq_ni C (pdb symbols) C:\Program Files\Debugging Tools for Windows (x64)\sym\System.Data.Linq.pdb\703A918D116A4558BB44245924371ACD1\System.Data.Linq.pdb Loaded symbol image file: System.Data.Linq.ni.dll Image path: C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Data.Linq\acbd568cd3c2499fbb7b2639c4a46a81\System.Data.Linq.ni.dll Image name: System.Data.Linq.ni.dll Has CLR image header, track-debug-data flag not set Timestamp: Fri Apr 11 20:41:26 2014 (534899C6) CheckSum: 00000000 ImageSize: 00333000 File version: 4.0.30319.34209 Product version: 4.0.30319.34209 File flags: 0 (Mask 3F) File OS: 4 Unknown Win32 File type: 2.0 Dll File date: 00000000.00000000 Translations: 0000.04b0 0000.04e4 0409.04b0 0409.04e4 
+3
debugging c # windbg crash-dumps postmortem-debugging
source share
3 answers

ni in the name shows that this is the native version (ngen optimized), which differs from machine to machine. You must create a PDB on the machine where you got dmp with ngen:

 ngen createpdb C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Data.Linq\ f989891b3a507d4aaec44ab1df12e9d5\System.Data.Linq.ni.dll c:\symbols /debug 

Now add the PDB from the C: \ characters to the Windbgs character path.

+4
source share

There are a few things to consider for .NET:

  • Make sure you have a good dump for .NET , i.e. a 64-bit dump of a 64-bit process or a 32-bit dump of a 32-bit process. If lm m wow64 shows a module, this is not a "good" dump.
  • Configure characters , at least .symfix c:\symbols and .reload
  • Get the .NET debug files (SOS.dll and mscordacwks.dll) from the source PC and rename them accordingly. See in another answer for more details.

    My free Mscordacwks Collector tool will do this for you, including renaming.

    If this computer is no longer available, you can search for these files in my mscordacwks and SOS archive

    Disclaimer: I am the author of these, if it was not clear enough.

+2
source share

You can download WINDBG official characters from Microsoft servers by running the following command:

 .sympath srv*c:\symbols*http://msdl.microsoft.com/download/symbols .reload /f 

This will save the characters downloaded from the server in the local cache to C:\Symbols , and then force the characters for all currently loaded modules to be reloaded.

+1
source share

All Articles