Windows Debugging Symbols - Not Loading
The download links for the RTM or SP1 symbols are pretty much useless. After each patch day you will get a changed ntdll.dll or other central OS libraries. This will render your "old" pdbs useless. You need to download them therefore from the symbol servers to be sure that you are up to date.
But since not all dlls are changed you should set your Symbol server download cache to the same location where you have unpackaged your downloaded symbols.
Go to:
Tools - Options - Debugging - Symbols
and set the path for Cache symbols in this directory.
Load all symbols means that you do load all symbols for all modules that are loaded in your current process. But it will not dowload all symbols for all dlls that are used by Windows. If you do download Windbg you get a tool called symchk.exe which allows you to download the symbols for all binaries recursively.
Comments
-
Ajay almost 4 years
I am having Windows 7 x64 SP1. I have downloaded symbols from:
http://msdn.microsoft.com/en-us/windows/hardware/gg463028
I have downloaded and installed x64 RTM and x64 SP1 symbols for Windows 7 x64 SP1. Installed on
T:\Symbols
folder.But When I debug a 64-bit native C++ application, the symbols would not load at all. For
ntdll.dll
, for instance, the PDBs are located in:T:\Symbols\ntdll.pdb\6192BFDB9F04442995FFCB0BE95172E12
T:\Symbols\ntdll.pdb\CFF40300FD804691B73E12CF2A150EE02
But Visual Studio (2008/2010) will not load symbols. While debugging, from Modules View, I select
ntdll.dll
and sayLoad Symbols From -> Symbol Path
, the specify thentdll.pdb
. For both of mentioned paths, it will always say:A matching symbol file was not found in this folder.
I have also added this folder (
T:\Symbols
) inDebugging -> Options
, but it will still not load the symbols. While debugging,Load All Symbols
button would be enabled, and clicking would not load the symbol either!For 32-bit the PDB filename would be
wntdll.pdb
forntdll.dll
and would be stored in GUID-named folders in fashion mentioned above. But VS will not load symbols for 32-bit debugging either.Quite interestingly (and frustratingly), when I select
Load Symbols From -> Microsoft Symbols Server
, it will download and load the symbols perfectly. It will download the symbols at following location (full path forntdll
):\Users\...\AppData\Local\Temp\SymbolCache\ntdll.pdb\6192BFDB9F04442995FFCB0BE95172E12
Here you can see the GUID is matching with the GUID-named folder in
T:\Symbols
path, but for manually installed symbols VS is rigid not to load it!For NTDLL.PDB, despite the respective folder being same, and the size of PDB also being same, the timestamp might be different.
Sometimes VS would also place symbols in:
C:\...\AppData\Local\Temp\SymbolCache\MicrosoftPublicSymbols
If VS would download correct symbols ONLY from Microsoft Symbols Server, then what the use of locally downloaded symbols?
My question is basically how to load locally downloaded and installed symbols?
-
Ajay over 12 yearsAlright, but what for a system that is not connected to Internet?
-
Alois Kraus over 12 yearsThen you should copy the dlls and exes of your target system to a computer which has internet access and use symchk.exe to download the matching pdbs.
-
Max Truxa almost 9 yearsNo, you shouldn't. If you need up-to-date symbols for a machine that is not connected to the Internet you create a manifest using
symchk
with the/om
argument and then copy the manifest (not all .exe/.dll/... files) to a machine with Internet access. There you can usesymchk
again, but this time with the/im
argument, to download PDBs for the files referenced by the manifest.