Please enable JavaScript to view this site.

Bug Validator Help

Navigation: Frequently Asked Questions

How do I examine the DbgHelp symbol search path?

Scroll Prev Top Next More

When symbols fail to load for modules built with compilers that generate PDB files (Microsoft C++ compilers and linkers, Intel performance compilers and linkers) it can be confusing why the failure has occurred.

 

There are typically three broad classes of success/failure when trying to load symbols in a PDB file:

1.a missing PDB file
2.a PDB file located in the wrong place (you think it's present but the debugging library can't find it)
3.an incorrect PDB file (you think it's correct but it's actually from the wrong build)

 

The diagnostic tab of Bug Validator displays many types of information that can help diagnose many problems when working with Bug Validator.

These information groups can be selected using the combo box at the top of the diagnostic display. The DbgHelp debug group allows us to examine where DbgHelp.dll looks

for symbols. By examining the output we can identify if it is finding the PDB file we think it should be finding and if it likes the contents of any PDB file it finds.

 

The output for alternate modules is shown in alternate colours. This makes it easier for you to determine which output is for the DLL you are interested in. The output shown is the exact same output that DbgHelp.dll sends to it's debugging stream. We have added nothing. We have removed nothing. We beleive showing you the exact information DbgHelp.dll outputs is the best way to help you determine what actions to take to resolve any issue with symbol loading.

 

Below we show three examples using nativeExample.exe and nativeExample.pdb.

 

 

Correct symbol file for nativeExample.exe

 

 dbgHelpCorrectSymbolsFound

 

DbgHelp searches in various places looking for nativeExample.pdb.

 

Eventually nativeExample.pdb is found in c:\Program Files (x86)\Software Verify\Bug Validator x86\examples\nativeExample\ReleaseDynamic10_0\nativeExample.pdb.

 

DbgHelp loads private symbols and lines. (The alternate outcome is that DbgHelp loads public symbols).

 

Outcome: Success. Symbols are loaded.

 

 

Missing symbol file for nativeExample.exe

 

 dbgHelpCoffNoSymbolsFound

 

DbgHelp has the search path set then searches in various places looking for nativeExample.pdb.

 

nativeExample.pdb never gets found on the search path. SymSrv then looks for additional locations for nativeExample.pdb. None are found.

 

DbgHelp does find some COFF symbols in the executable. Unfortunately COFF symbols do not contain filename or line number information.

 

Outcome: Failure. The PDB file could not be found. Some default symbols are loaded but are not of much use,

 

Resolution: Check the File Locations PDB paths to ensure that all the possible paths for PDB files are listed.

 

 

Incorrect symbol file for nativeExample.exe

 

 dbgHelpMismatchedSymbolsFound

 

DbgHelp searches in various places looking for nativeExample.pdb.

 

Eventually nativeExample.pdb is found in c:\Program Files (x86)\Software Verify\Bug Validator x86\examples\nativeExample\ReleaseDynamic10_0\nativeExample.pdb.

 

DbgHelp attempts to load the symbols but fails because the symbols are for a different build of the software. The checksum inside the PDB file does not match the module.

DbgHelp does find some COFF symbols in the executable. Unfortunately COFF symbols do not contain filename or line number information.

 

Outcome: Failure. A PDB file was found but it was not the correct PDB file. Some default symbols are loaded but are not of much use,

 

Resolution:

Ensure the PDB file found is the correct PDB file for the build. If you are copying builds from a build server be sure to copy the correct PDB files as well.

Check the File Locations PDB paths to ensure that all the possible paths for PDB files are listed in the correct order so that if multiple paths have a PDB file with the same name that the correct PDB file is found first.