The Windows Driver Kit (WDK) 4

 

 

 

 

 

The WinDbg

 

After executing windbg, you need to set the path to the symbol files. This path points to the directories with the pdb files of your drivers. You can have different directories by separating them with a semicolon (;). You also need to point to the corresponding PDB files of all the windows components, if you want the call stacks that you'll see to include the functions from the components that are developed by Microsoft. However, the problem in this case is that the windows PDB files change between service packs, hotfixes, etc. Fortunately, Microsoft has configured a symbol server, which can be used to download the needed files on-demand. This means that you just set the symbol path to the symbol server and windbg downloads only the PDB files that it needs. In order to do this, you need to add an entry to the windbg symbol path that's equal to:

 

SRV*DownstreamStore*http://msdl.microsoft.com/download/symbols

 

In the above line, http://msdl.microsoft.com/download/symbols is the symbol server (you don't need to modify this), and DownstreamStore is the path, where you want the pdb files to be downloaded. This needs to be substituted by a local directory, e.g. C:\Symbols, so the complete entry would be:

 

SRV*c:\Symbols*http://msdl.microsoft.com/download/symbols

 

WinDbg, Windows debugger: Setting the Symbol File Path

 

Setting the Symbol File Path

 

WinDbg, Windows debugger: : Setting the PDB Symbol File Path for the on demand download

 

Setting the PDB Symbol File Path for the on demand download

 

Finally, if you have additional pdb files for the drivers that you are developing in directories C:\mydrivers1, C:\mydrivers1\misc and C:\mydrivers2, the complete symbol path would be:

 

SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols;c:\drivers1;c:\drivers1\misc;d:\drivers2

 

Also, as it can be seen from the above example, the directories in the path aren't recursive, so if you have PDB files both in C:\mydrivers1 and C:\mydrivers1\misc, then you need to include both of them, since the format doesn't imply the latter. In order to set this line, you need to open windbg, go to File Symbol File Path and paste the line in the text area.

In our case the PDB files already installed under the C:\Symbols directory, so we just point to the directory in the Symbol File Path.

Launch the Windbg program.

 

WinDbg, Windows debugger: Invoking the Symbol File Path setting page

 

Invoking the Symbol File Path setting page

 

WinDbg, Windows debugger: The Symbol File Path setting page

 

The Symbol File Path setting page

 

WinDbg, Windows debugger: Selecting the C:\Symbols as the Symbol File Path

 

Selecting the C:\Symbols as the Symbol File Path

 

WinDbg, Windows debugger: The Symbol File Path has been set to the local C:\Symbols directory

 

The Symbol File Path has been set to the local C:\Symbols directory

 

Don’t forget to save the changes that have been done.

 

WinDbg, Windows debugger: Saving the WinDbg changed workspace

 

Saving the WinDbg changed workspace

 

More complete information should be found in the Help.

 

WinDbg, Windows debugger: Invoking the WinDbg Help

 

Invoking the WinDbg Help

 

WinDbg, Windows debugger: The WinDbg Help

 

The WinDbg Help

 

Kernel-mode memory dump files can be analyzed by WinDbg. The processor or Windows version that the dump file was created on does not need to match the platform on which KD is being run.

 

 

 

 

< Windows Driver Kit (WDK) 3 | Windows Driver Kit (WDK) Programming | Win32 Programming | Windows Driver Kit (WDK) 5 >