That's a good summary. Anything from Beej is very good usually.
Watches are incredibly useful. I remember struggling with a bug, wasted days or even weeks on it. Then during lunch an older more experience engineer told me to use watchpoints, and just like that I could see the trace of what was writing over that particular memory address and the problem was solved. It's like in the movies where the master utters some cryptic koan and the struggling apprentice is suddenly enlightened.
Speaking of corrupted memory, another command to add is "x" it stands for "examine memory" and it does just that. Then after examining the memory, for fun, set a watchpoint to see what code ends writing or reading from it.
Watches are incredibly useful. I remember struggling with a bug, wasted days or even weeks on it. Then during lunch an older more experience engineer told me to use watchpoints, and just like that I could see the trace of what was writing over that particular memory address and the problem was solved. It's like in the movies where the master utters some cryptic koan and the struggling apprentice is suddenly enlightened.
Speaking of corrupted memory, another command to add is "x" it stands for "examine memory" and it does just that. Then after examining the memory, for fun, set a watchpoint to see what code ends writing or reading from it.