Use the Variables view to display the contents of variables that are currently in scope.
It also enables you to:
Change the values of the variables.
Freeze the view to prevent the values being updated by a running target.
Figure 10-31 Variables view
Right-click on the column headers to select the columns that you want displayed:
The name of the variable.
The value of the variable.
Read-only values are displayed with a grey background. Any other color means that you can edit the value.
A value that you can edit is initially shown with a white background. If the value changes, either by performing a debug action such as stepping or by you editing the value directly, the background changes to yellow.
If you freeze the view, then you cannot change a value.
The type of the variable.
The number of array or pointer elements.
The size of the variable in bits.
The address of the variable.
- The access mode for the variable.
- Show All Columns
- Displays all columns.
- Reset Columns
- Resets the columns displayed and their widths to the default.
All columns are displayed by default.
Toolbar and context menu options
The following options are available from the toolbar or context menu:
Links this view to the selected connection in the Debug Control view. This is the default. Alternatively you can link the view to a different connection. If the connection you want is not shown in the drop-down list you might have to select it first in the Debug Control view.
Searches the data in the current view for a variable.
Copies the selected variables. To copy the contents of an item such as a structure or an array, you must first expand that item.
This can be useful if you want to copy variables to a text editor in order to compare the values when execution stops at another location.
- Select All
Selects all variables currently expanded in the view.
- Show in Memory
Where enabled, displays the Memory view with the address set to either:
The value of the selected variable, if the variable translates to an address, for example the address of an array,
The location of the variable, for example the name of an array,
The memory size is set to the size of the variable, using the
- Show in Disassembly
- Where enabled, displays the Disassembly view, with the address set to the location of the selected variable.
- Show in Registers
If the selected variable is currently held in a register, displays the Registers view with that register selected.
- Show Dereference in Memory
If the selected variable is a pointer, displays the Memory view with the address set to the value of the variable.
- Show Dereference in Disassembly
- If the selected variable is a pointer, displays the Disassembly view, with the address set to the value of the variable.
- Translate Variable Address
Displays the MMU view and translates the address of the variable.
- Toggle Watchpoint
- Displays the Add Watchpoint dialog to set a watchpoint on the selected variable, or removes the watchpoint if one has been set.
- Disable Watchpoint, Enable Watchpoint
- If a watchpoint has been set on the selected variable, disables or enables the watchpoint
- Resolve Watchpoint
- If a watchpoint has been set on the selected variable, re-evaluates the address of the watchpoint. If the address can be resolved the watchpoint is set, otherwise it remains pending.
- Watchpoint Properties
- Displays the Watchpoint Properties dialog box. This enables you to control watchpoint activation.
- Send to <selection>
Enables you to add variable filters to an Expressions view. Displays a sub menu that enables you to specify an Expressions view.
- <Format list>
A list of formats you can use for the variable value.
- View Menu
The following View Menu options are available:
- New Variables View
Displays a new instance of the Variables view.
Refreshes the view.
- Freeze Data
Toggles the freezing of data in the current view. You cannot modify the value of a variable if the data is frozen. This option also disables or enables the Refresh option.
If you freeze the data before you expand an item for the first time, for example an array, the view might show
Pending.... Unfreeze the data to expand the item.
- Editing context menu options
The following options are available on the context menu when you select a variable value for editing:
Reverts the last change you made to the selected value.
Copies and deletes the selected value.
Copies the selected value.
Pastes a value that you have previously cut or copied into the selected variable value.
Deletes the selected value.
- Select All
- Selects the value.