13.8.1. Examining registers in the Registers view

To examine the contents of registers:

  1. Connect to your target.

  2. Load an image.

    For example, load the Dhrystone example image dhrystone.axf.

  3. Select View → Registers from the Code window main menu to open the Registers view as a floating view. The Core tab is displayed by default. Figure 13.17 shows an example:

    Figure 13.17. Registers view

    Registers view

The Registers view displays tabs appropriate to the:

Demonstrating how the register view changes during execution

The following procedure demonstrates how the register view changes during execution:

  1. Follow the procedure described in Examining registers in the Registers view.

  2. Click the Locate PC button on the Debug toolbar to display the source file containing the current scope.

  3. Click the dhry_1.c tab to view the source file dhry_1.c.

  4. Set a simple breakpoint by double-clicking in the gray margin on line 301.

  5. Click Run to start execution.

  6. Enter 5000 when asked for the number of runs. The program starts and then stops when execution reaches the breakpoint at line 301. The yellow arrow and red box marks the location of the PC when execution stops.

  7. The contents of the Registers view are updated to show the program status as the target stops, shown in Figure 13.18.

    Figure 13.18. Registers view

    Registers view

  8. Click the Step button to step one line of source. Register values that have changed since the last update are displayed in dark blue, shown in Figure 13.19.

    Figure 13.19. Registers changed since the last update

    Registers changed since the last update

  9. Click Step again and examine the register values as they change. Register values that changed at the previous update are displayed in pale blue, shown in Figure 13.20.

    Figure 13.20. Registers changed at the previous update

    Registers changed at the previous update

  10. Repeat the last step as required.

  11. Double-click on the red marker disc to clear the breakpoint at line 301.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N