2.8 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 sourcefile. All the views update as you step through the source code.
  10. 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.
Related tasks
Importing the example projects into Eclipse
Building the Gnometris project from Eclipse
Building the Gnometris project from the command-line
Loading the Gnometris application on a Real-Time System Model (RTSM)
Loading the Gnometris application on to an ARM® Linux target
Configuring an RSE connection to work with an ARM® Linux target
Connecting to the Gnometris application that is already running on a ARM® Linux target
Related reference
Examples provided with DS-5™
Related information
C/C++ editor
Debug Control view
Registers view
Non-ConfidentialPDF file icon PDF versionARM DUI0478N
Copyright © 2010-2013 ARM. All rights reserved.