I am interested to know on what things I need to concentrate on debugging c code without a debugger. What are the things to look for?
Generally I look for the following:
- Check whether correct value and type is being passed to a function.
- Look for unallocated and uninitialized variables
- Check for function syntax and function is used in right way.
- Check for return values
- Check for locks are used in the right way.
- Check for string termination
- Returning a varible in stack memory from a function
- Off by one errors
- Normal syntax errors
- Function declaration errors
Any structured approach is very much appreciated.