1.WhatDebugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another.[8]2.Why/Goal3.How/Process3.1 Reproduce the bug[8]3.2 Simplify the test case[8]3.3 Locate the cause of the bug[3][4]3.4 Repair the bug ... debugging is a problem-solving process. The most effective method of debugging is a mental analysis of the information associated with the error’s symptoms. An efficient program debugger should be able to pinpoint most errors without going near a computer. [10] give an excellent example of how to debug a memory allocation bug "with your brain". Use Debugging Tools Only as a Second Resort - Use debugging tools after you’ve tried other methods, and then only as an adjunct to, not a substitute for, thinking. ... debugging tools, such as dumps and traces, represent a hap- hazard approach to debugging. Experiments show that people who shun such tools, even when they are debugging programs that are unfamiliar to them, are more successful than people who use the tools. Avoid Experimentation—Use It Only as a Last Resort: The most common mistake novice debuggers make is trying to solve a problem by making experimental changes to the program. You might say, “I know what is wrong, so I’ll change this DO statement and see what happens.” This totally haphazard approach cannot even be considered debugging; it represents an act of blind hope. Not only does it have a minuscule chance of success, but it often compounds the problem by adding new errors to the program. 5. Case Studies5.1 Memory Management Debugging[6, Chapter 4][9] References: 1.gdb Tutorial: http://www.cs.cmu.edu/~gilpin/tutorial 2.http://www.acm.uiuc.edu/sigops/roll_your_own/2.html 3.Locating Causes of Program Failures 4.Locating Causes of Program Failures, www.cse.ohio-state.edu/~rountev/788/papers/Brandon.ppt 5. Glenford J. Myers, The Art of Software Testing 6. Steve Best, Linux.Debugging.and.Performance.Tuning.Tips.and.Techniques, Prentice.Hall 7. David J. Agans, Debugging - The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems 8. http://en.wikipedia.org/wiki/Debug 9. Using GNU's GDB Debugger: Memory Layout And The Stack, http://www.dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php 10. Debuggin with your brain, http://www.dirac.org/linux/gdb/02b-Debugging_With_Your_Brain.php |