Can WinDBG be made to find mscordacwks.dll in the symbol store?

前端 未结 2 450
别那么骄傲
别那么骄傲 2021-02-09 22:28

The Question

There are plenty of manual ways to make WinDBG find mscordacwks.dll without a symbol store (putting the file in the path somewhere, putting it in the same

相关标签:
2条回答
  • 2021-02-09 23:07

    Since no other solution has appeared and my workaround seems to handle everything nicely, I'm just going to keep on with that, and I would recommend anyone else who never wants to see the annoying Failed to load data access DLL, 0x80004005 error again do the same.

    So to make this work for you (and everyone who uses your symbol store, so I really wish Microsoft would do this to save us all a lot of trouble) simply place the compressed DAC file (mscordacwks.dl_) by hand into the correct path within your local SYM store.

    Here are the steps I follow to accomplish this:

    1. In WinDBG do a !sym noisy
    2. In WinDBG do a .cordll -ve -u -l
    3. In WinDBG do another !CLRStack or other psscor2 command if necessary to force it to load symbols again
    4. The symbol search logging will reveal the dll it’s looking for and where it’s looking in your symbol store by showing lines like this: C:\Symbols\mscordacwks_AMD64_AMD64_2.0.50727.4216.dll\4E1545829a3000\mscordacwks_AMD64_AMD64_2.0.50727.4216.dll which indicates two things:
      • you need the 64-bit mscordacwks.dll of version 2.0.50727.4216; see https://stackoverflow.com/a/12024171/1910619 for ways to get it
      • it needs to go in a subfolder called 4E1545829a3000 under a folder called mscordacwks_AMD64_AMD64_2.0.50727.4216.dll in your symbol store
    5. Once you obtain the file, rename it according to the name WinDBG is looking for, e.g. "mscordacwks_AMD64_AMD64_2.0.50727.4216.dll"
    6. Manually compress this file using makecab.exe like this: makecab /D CompressionType=LZX /D CompressionMemory=21 mscordacwks_AMD64_AMD64_2.0.50727.4216.dll mscordacwks_AMD64_AMD64_2.0.50727.4216.dl_
    7. Copy that compressed file to the expected place in the symbol store. (That you found in step 4 above, so C:\Symbols\mscordacwks_AMD64_AMD64_2.0.50727.4216.dll\4E1545829a3000\mscordacwks_AMD64_AMD64_2.0.50727.4216.dl_ in our running example here.)
    0 讨论(0)
  • 2021-02-09 23:22

    You have to put the CLR dll and the associated mscordacwks dll in the same folder and register the CLR dll with symstore. In that case symstore will add the clr and the mscordacwks dll on the symbol store.

    More importantly, it will use the timestamp and file size of the clr dll to create the mscordacwks subfolder, so windbg can find the mscordacwks dll when debugging a dump.

    The mscordacwks name must follow the mscordacwks_ARCH_ARCH_fileversion pattern, otherwise symstore won't add it to the symbol store.

    I didn't find any documentation on that feature so it may be removed in the future.

    Here is the command and the symstore output:

    symstore.exe add /o /f 4.6.1076.00\clr.dll /t clr.dll /s \\mystore\microsoft
    SYMSTORE MESSAGE: 0 alternate indexers registered
    SYMSTORE MESSAGE: LastId.txt reported id 0
    SYMSTORE MESSAGE: History.txt reported id 58228
    SYMSTORE MESSAGE: Final id is 0000058228
    SYMSTORE MESSAGE: Copying C:\Users\build.robot\symstore\4.6.1076.00\clr.dll to \\mystore\microsoft\clr.dll\56D79ED4990000\clr.dll [Force: T, Compress: F]
    SYMSTORE MESSAGE: Copying 4.6.1076.00\mscordacwks_AMD64_AMD64_4.6.1076.00.dll to \\mystore\microsoft\mscordacwks_AMD64_AMD64_4.6.1076.00.dll\56D79ED4990000\mscordacwks_AMD64_AMD64_4.6.1076.00.dll [Force: T, Compress: F]
    
    SYMSTORE: Number of files stored = 2
    SYMSTORE: Number of errors = 0
    SYMSTORE: Number of files ignored = 0
    
    0 讨论(0)
提交回复
热议问题