A breakpoint must always be marked by an .global label in the program
In other words:
When the program is doing something unexpected (= something other than what the program should do), a good programmer has find the bug !!!
I.e.: find out when an error occured in the execution of your program !!!
The instruction(s) that fail to perform what you expect them to do, are errors
This labeled must be defined using .global !
Recall:
(But if you have no idea what your program should accomplish, then you need to brush up on your knowledge before you can tackle this task).
Example:
for ( k = 0; k <= 100; k++ ) { access array element A[k] }
If you step all the instructions in a loop, you will waste a lot of time going through many iterations of the loop to find your bug (error) !!!
How to perform the 2 step debug procedure:
Keep pressing the Run button until the program crashes
You must count the number of times that you have clicked the "Run" button !!!
Let n = the number of times that you have clicked the "Run" button
(I.e.: n = the iteration number in which the loop crashes)
We know that the first n−1 times through the loop was OK --- so don't waste time stepping thorugh each instruction of the loop !!!
Back to tabel of contents