2.8 Debugging Gnometris

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

Procedure

  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
2.2 Importing the example projects into Eclipse
2.3 Building the gnometris project from Eclipse
2.4 Building the gnometris project from the command line
2.5 Loading the Gnometris application on a Fixed Virtual Platform (FVP)
2.6 Loading the Gnometris application on to an ARM® Linux target
2.7 Configuring an RSE connection to work with an ARM® Linux target
2.7.2 Connecting to the Gnometris application that is already running on a ARM® Linux target
Related reference
3.6 Examples provided with DS-5
Related information
C/C++ editor
Debug Control view
Registers view
Non-Confidential - BetaPDF file icon PDF versionARM DUI0478U
Copyright © 2010-2015 ARM. All rights reserved.