3.2.4. Examining and setting variables, registers, and memory

You can use the ARM Debugger to display and modify the contents of the variables and registers used by your executable image. You can also examine the contents of memory.

Variables

You can display and modify both local and global variables. Follow these steps to display and modify a variable:

  1. Display either the Locals or Globals window:

    1. Select View  ? Variables  ? Local or click the Locals button on the toolbar to display a list of local variables.

    2. Select View  ? Variables  ? Global to display a list of global variables.

  2. Double click on the value you want to change in the right pane of the window. The Memory window is displayed, showing the area around your selected location.

  3. Double click on the value to change it.

  4. Press Return when you have set the variable to the required value.

Registers

To display a list of registers for the current processor mode, click the Current Registers

button on the toolbar. Follow these steps to display and modify registers for a selected processor mode:

  1. Select the Registers submenu from the View menu.

  2. Select the required processor mode from the Registers submenu. The registers are displayed in the appropriate Registers window.

  3. Double click on the register you want to modify. The Memory window is displayed, showing the area around your selected location.

  4. Double click on the value to change it.

  5. Press Return when you have set the variable to the required value.

Memory

Follow these steps to display the contents of a particular area of memory:

  1. Select Memory from the View menu or click on

    the Memory button. The Memory Address dialog is displayed.

  2. Enter the address as a hexadecimal value (prefixed by 0x) or as a decimal value.

  3. Click OK. The Memory window opens and displays the contents of memory around the address you specified.

When you have opened the Memory window you can:

  • display other parts of the current 4KB area of memory by using the scrollbar

  • display more remote areas of memory by entering another address

  • right click anywhere in the window to display the Memory window menu, allowing you to display the contents as words, half words, or bytes with ASCII characters.

Follow these steps to enter another address:

  1. Select Goto from the Search menu or select Goto Address from the Memory Window menu. The Goto Address dialog is displayed.

  2. Enter an address as a hexadecimal value (prefixed by 0x) or as a decimal value.

  3. Click OK.

See Saving or changing an area of memory for more information on working with areas of memory.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D
Non-Confidential