Load Symbols

Load Symbols

For debugging, first thing to do in WinDbg is to load symbol files. As explained in previous article, symbol path should be set either from WinDbg UI or .sympath command. If symbol path is not set, srv* is set by default. And if the PDB symbol file is in the same directory as EXE/DLL location, the PDB symbol will be loaded without adding the directory to the symbol path.

Once symbol path is set, run ".reload /f" command to reload all symbol files. Option /f here forces WinDbg to immediately load the symbols.

After symbol is loaded, we can check the symbol load states by running "lm" (list load modules) command. lm command displays module name, symbol type (private or public symbol) and symbol location. There are two symbol type - public symbol contains functions and global variables only while private symbol has all kind of information such as global/local variables, functions, data type info, source/line info. Typically symbols from MS symbol server are public symbol and your own symbol files are private symbols. Here is an example of loading symbols.
load symbol