UMBC CMSC 211 |
Needless to say, this can be a long drawn out affair, because you printed things at the wrong time, did not print something you needed, the problem is in a different area than you thought, etc! Thne you have to take out that code, undo it, if you will. Of course, that assumes that you don't make more bugs than you solve!
What is needed is a way to observe the program live, during execution, and change it dynamically. That is what an interactive debugger is! The user can cause:
To use CV, the program must be assembled with the debug information turned on so that you can use the symbolic names of your source code. It also allows you to work with the source code. To do this, assemble the code with one of the following:
Now you can use CV with the following:
The source code should be in the source1 window. This code can be displayed in three formats. One is just the source code with line numbers. One is the "disassembled code" on one line. The third on has the source code followed by disassembled code. The disassembled code includes the machine language in hex format. The disassembled code shows the results of the macros after they are expanded, or the true code produced.
One window that should be opened manually everytime is the Register window. It will show the contents of each register and decode the flag register for you. This window provides you with essential information for the debug session.