Debugging the Gnometris application using the example project containing the image binaries and libraries provided with DS-5.
Ensure that you are connected to the target, Gnometris is running, and the debugger is waiting at the
- In the Project Explorer view, open the Gnometris directory to see a list of all the source files.
- Double-click on the file blockops-noclutter.cpp to open the file.
In the blockops-noclutter.c file, find the line
BlockOps::rotateBlock(), and double click in the vertical bar on the left-hand side of the C/C++editor to add a breakpoint. A marker is placed in the vertical bar of the editor and the Breakpoints view updates to display the new information.
- Click on Continue in the Debug Control view to continue running the program.
- Start a new Gnometris game on the target. When a block arrives, press the up cursor key to hit the breakpoint.
- Select the Registers view to see the values of the registers.
- Select the Disassembly view to see the disassembly instructions. You can also double click in the vertical bar on the left-hand side of this view to set breakpoints on individual instructions.
In the Debug Control view,
click on Step Over Source Line to move to
the next line in the source file. All the views update as you step through the
Tip:Select the History view to see a list of all the debugger commands generated during the current debug session. You can select one or more commands and then click on Exports the selected lines as a script to create a script file for future use.