Possibly Untrue Assumptions
Debugging can be extremely frustrating when you make assumptions about
the problem which turn out to be wrong.
Some things to be wary of:
- the executable comes from the source code you're reading
- the problem must be in this source file
- the problem cannot be in this source file
- code that calls a function never provides unexpected arguments
(e.g. "this pointer will never be NULL ; why would anyone pass a NULL ?")
- library functions never return an error status
(e.g. "malloc will always give the memory I ask for")
|