Windbg is a source-level debugging tool released by Microsoft. It can be used for kernel mode debugging and user mode debugging, you can also debug the dump file.
1. windbg introduction:
Debugging tools and symbols: getting started
Http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx
A word for windbg
Http://mtaulty.com/communityserver/blogs/mike_taultys_blog/archive/2004/08/03/4656.aspx
2. Download windbg:
Install debugging tools for Windows 32-bit version
Http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
Install debugging tools for Windows 64-bit versions
Http://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx
3. Configure windbg:
Run windbg-> menu-> file-> symbol file path-> set the _ nt_symbol_path variable as follows:
In the pop-up box, enter "C: \ mycodessymbols; SRV * c: \ mylocalsymbols * configure (follow these settings to find the symbol from the local folder C: \ mycodessymbols first, if not, the system automatically downloads symbols from the symbolserver of Ms ). Another way is to extract ". (
Note that the downloaded symbols version must be correct. In my win2003 + SP1, I thought that the symbols for installing win2003 + SP2 may be good at, but the result proved that I was wrong. When I opened the executable file with windbg, the prompt "PDB symbol for mscorwks. DLL not loaded; Defaulted to export symbols for NTDLL. dll "error. I have re-installed the symbols of win2003 + SP1, and now everything is running normally ^_^ )
4. Use windbg:
Windbg provides two running modes: graphical interface and command line. This section describes how to use the windbg in the graphic interface to debug applications. Program :
File-> openexecutable-> You can select an executable file for debugging;
File-> attache to a process-> select a running process and debug it;
So far, we can enter each function instruction in the text box marked with a red box (for instructions help documentation, refer: help-> contents-> debugging tools forwindows-> debuggers-> debugger reference. The following table lists the functions of all command machines !).