WinDbg configuration and usage Basics

Source: Internet
Author: User

WinDbg is a source-level debugging tool released by Microsoft. It can be used for Kernel mode debugging and user mode debugging, as well as Dump file debugging.

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 no Symbols is found, the system automatically downloads the Symbols from the MS Symbol Server ). 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, 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:
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 for Windows-> Debuggers-> Debugger Reference. The following table describes the functions of all command machines !).


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.