You copied the Doc URL to your clipboard.

Debugging Gnometris

Debugging the Gnometris application using the example project containing the image binaries and libraries provided with DS-5.


  1. Ensure that you are connected to the target, Gnometris is running, and the debugger is waiting at the main() function.
  2. In the Project Explorer view, open the Gnometris directory to see a list of all the source files.
  3. Double-click on the file blockops-noclutter.cpp to open the file.
  4. 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.
  5. Click on Continue in the Debug Control view to continue running the program.
  6. Start a new Gnometris game on the target. When a block arrives, press the up cursor key to hit the breakpoint.
  7. Select the Registers view to see the values of the registers.
  8. 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.
  9. 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 source code.


    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.
Was this page helpful? Yes No