| Debugging C and C++ code in a Unix environment | ||
|---|---|---|
| Prev | Chapter 3. Aspects of debugging C and C++ code | Next |
You should make sure that you understand a bug fully before you attempt to fix it. Ask yourself the following questions:
Have I really found the cause of the problem I observed, or is this a mere symptom?
Have I made similar mistakes (especially wrong assumptions) elsewhere in the code?
Is this cause just a programming error, or is there a more fundamental problem (e.g. the algorithm is incorrect)?