Chapter 18 Debugging Objectives Debugging is not testing
Chapter 18 Debugging Objectives • • Debugging is not testing and testing is not debugging. Debugging is an art more than technique. Steps of a general debugging process Debugging with Memory Dump Debugging with Watch Points Backtracking method Debugging guidelines Various types of Debuggers 1 © Oxford University Press 2011. All rights reserved.
Process Testing Evolution. Debugging of Software 2 © Oxford University Press 2011. All rights reserved.
Debugging Techniques Testing Evolution of Software Debugging with Memory Dump • A printout of all registers and relevant memory locations is obtained and studied. The storage locations are in octal or hexadecimal format. The relevant data of the program is observed through these memory locations and registers for any bug in the program. 3 © Oxford University Press 2011. All rights reserved.
Debugging with Watch Points 1. Output Statements 2. • • Breakpoint Execution Unconditional Breakpoint Conditional Breakpoint Temporary Breakpoint Internal Breakpoint 3. Single Stepping 4 © Oxford University Press 2011. All rights reserved.
Back. Tracking 5 © Oxford University Press 2011. All rights reserved.
Debugging guidelines Fresh thinking leads to good debugging Don’t isolate the bug from your colleagues Don’t attempt the code modifications in first attempt Additional test cases are must if you don’t get the symptom or clues to solve the problem Regression testing is a must after debugging Design should be referred before fixing the error 6 © Oxford University Press 2011. All rights reserved.
Debuggers Kernel Debugger Basic machine level debugger In-Circuit Emulator Interpretive programming environment Debugger 7 © Oxford University Press 2011. All rights reserved.
- Slides: 7