I am studying a failed program, but I cannot load characters for my own DLL files in Visual Studio 2013. The application is 32-bit and uses .NET 4.0.30319. I confirmed this by checking which version of clr.dll is loaded into the process from the module window. Also from the modules window, I checked where mscorlib.ni.dll was loaded from:
clr.dll C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll mscorlib.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\ce5f61c5754789df97be8dc991c47d07\mscorlib.ni.dll
I was able to successfully generate PDB for mscorlib.ni.dll:

but when I try to load it into VS 2013 by right-clicking on the stack stack for mscorlib.ni.dll and selecting Load Symbols, I get a message that says: "The corresponding character file was not found in this folder."
I looked:
Creating Ngen Pdbs for profiling reports / And there were simple instructions for generating PDB, because I just want to see function calls at this point,
Get the correct .net native characters for Windbg
How to get PDB file for mscorlib.ni.lib (.Net Framework 3.5)
It seems that the most common source of errors is choosing the right bit. I know from the modules tab that I am downloading the 32-bit version of mscorlib.ni.dll and again from my screenshot, you can see that I am using the same version of the .NET framework and the 32-bit version of Ngen.exe. I tried this for WindowsBase.ni.dll and saw the same behavior when I was able to generate a PDB but could not load it.
I have a debugger enabled to debug managed and native code.
Questions:
- Am I using the wrong version of ngen.exe to create this PDB?
- What does Visual Studio check when trying to load a PDB?
- Is there another parameter that I need to enable in VS to debug this type of code?
Thanks!
debugging pdb native-code ngen
krtzer
source share