Learning windows Advanced debugging with me (1)

Source: Internet
Author: User

Why do you want to debug windows with me?

This series of articles uses the C/C ++ language, vs comes with a debugger, windbg and other related debugging tools, introduce the early advanced debugging in the user mode in windows, does not involve kernel debugging.

About me

I am not an expert, but a programmer who loves technology.

This series of blog posts has the following three purposes:

1. system learning-related debugging technology.

2. Record the learning process.

3. Exchange debugging technology.

4. Help more beginners.

Target audience:

1. I have written related windows programs in C/C ++ and want to learn about debugging technologies.

2. Children's shoes who are familiar with IDE built-in debugger debugging, but are not familiar with windbg and want to use windbg to improve work efficiency.

3. I have used windbg for debugging, but have not systematically studied the relevant debugging theory.


Maybe many people will ask whether debugging is classified into basic and advanced debugging? Here I will classify Basic Debugging and advanced debugging as follows:

Elementary debugging: Use the built-in debugging tools of IDE, such as vc6.0 or vs, and use breakpoints for simple single-step tracking and single-step debugging during development.

Advanced debugging: Use windbg to locate and fix various complex problems. Such as stack overflow, heap damage, deadlock, and resource leakage.

The reason for this distinction is not because the vs built-in debugger is not as good as windbg. They have their own applicability.

Why do you want to debug

Programmers who have some programming experience understand that it is impossible for a program to be written again. It must be modified, run, modified, and then run after several iterations before being delivered or released. The release does not end, because various bugs are also found during the running, and then a series of iteration processes, such as bug change-> test-> introduce new bugs-> test again. For software projects with tight schedule, the delivery is delayed due to the failure to fix existing bugs in the future. The customer's opinions and dissatisfaction with the leadership damage the company's reputation. With the software debugging technology, various bugs are no longer difficult to overcome.

Every time I talk about debugging, I hear that I have enough debugger to use vs. Why do I need to learn about windbg?

I have to admit that vs comes with a debugger more operable than windbg. In the coding stage, vs is the best choice. In contrast, windbg has many obscure commands, the interface is ugly, and the operability is poor. It needs to be configured before use. However, Windbg is useful for subsequent debugging (which will be introduced later) and locating complex problems such as deadlocks, resource leaks, and heap damages. Windbg is flexible and powerful Based on command lines. The two have different application scopes. In the future, we will use both of them for problem locating and analysis.

Benefits of learning debugging technology:

1. integrate multiple aspects of knowledge.

Software Debugging involves the knowledge of the operating system, cpu, compilation principles, and other aspects. It is a complex interaction process between various computer modules. Learning debugging not only improves our debugging skills, it can also deepen its understanding of computer systems and integrate the knowledge of various disciplines.

2. Applications are used in normal development to improve software debuggable.

In the software development process, you can add code that facilitates debugging and facilitate future debugging. This improves debugging efficiency and facilitates future maintenance.

3. quickly familiarize yourself with unfamiliar code and the underlying system.

Use Debugging techniques to observe, track, and understand the code execution process, and deepen the understanding of the software execution process and the underlying system.

4. improve work efficiency.

The extension of many software projects is related to the inability to locate and solve existing bugs. After mastering the basic debugging methods and debugging tools, you can improve work efficiency. Problems that originally took a long time to locate and discover can be quickly solved. You certainly don't need to work overtime, and software projects can also be delivered on schedule to improve customer satisfaction and the company's competitiveness.

5. Improving the core competitiveness of individuals is conducive to the long-term development of individuals.

Due to the extensive relevance of software debugging technology, it makes it more difficult to learn software debugging technology and has a high entry threshold. At the same time, it is difficult to develop and upgrade the technology in a short time. The software debugging technology has good stability and can be used for life.


I have been familiar with many excellent programmers and found that they are very interested in software debugging. The software they wrote has been repaired through debugging before being submitted for testing. The problems found during the test can also be detected in a timely manner. Therefore, we have a good reputation in the company.


Preliminary plan this series of articles is divided into preliminary articles, advanced articles and advanced articles.

The following articles will cover the following:

1. Introduce the use of the vs built-in debugger and perform simple debugging.

2. Contact windbg for the first time and briefly introduce the use of windbg.

3. Use windbg for simple debugging.

 

Both the preliminary and advanced sections are practical, and everything starts with being applied to actual use. I do not pay attention to the debugging theories of various lengthy articles. With the deepening of understanding, the advanced article will systematically elaborate on various theories.

Learning Software Debugging is boring. You must study debugging theory over and over again. At the same time, we are also happy. We are delighted to overcome one difficulty. In this impetuous age, we always complain that the wages are too small, the house is too small, and the car is not good. However, the situation will not change after complaints. The best way to change the status quo is to change ourselves. Calm down and study something to improve your gold content. No one will lose sight of a person with real talents. Of course, it is not necessary to study debugging technology, and any other technology is the same.

2014.2.9 in Hangzhou, Zhejiang Province

 

 

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.