11.11 Expressions view

Use the Expressions view to create and work with expressions.

Figure 11-12 Expressions view
Expressions view

You can:
Add expressions
Enter your expression in the Enter new expression here field and press Enter on your keyboard. This adds the expression to the view and displays its value.

Note

If your expression contains side-effects when evaluating the expression, the results are unpredictable. Side-effects occur when the state of one or more inputs to the expression changes when the expression is evaluated.
For example, instead of x++ or x+=1 you must use x+1.
Edit expressions
You can edit the values of expressions in the Value field. Select the value and edit it.
Delete expressions
In the Expressions view, select the expression you want to remove from view, and click Delete button to remove the selected expression. If you want to remove all expressions, click Delete all button.

Tip

HandYou can also use the Delete key on your keyboard to delete the currently selected expression.
Refresh view
To refresh or update the values in the view, click Refresh button.

Example 11-1 Expression examples

When debugging the Linux kernel, to view its internal thread structure, use these expressions:
For ARMv7 in SVC mode, with 8K stack size:
(struct thread_info*)($SP_SVC & ~0x1FFF)
For ARMv8 AArch64 in EL1, with 16K stack size:
(struct thread_info*)($SP_EL1 & ~0x3FFF)

Toolbar and context menu options

The following options are available from the toolbar or context menu:
Linked: context
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.
Remove Selected Expression
Removes the selected expression from the list.
Remove All Expressions
Removes all expressions from the list.
Cut
Copies and removes the selected expression.
Copy
Copies the selected expression.
To copy an expression for use in the Disassembly view or Memory view, first select the expression in the Name field.
Paste
Pastes expressions that you have previously cut or copied.
Delete
Deletes the selected expression.
Select All
Selects all expressions.
Show in Registers
If the expression corresponds to a register, this displays the Registers view with that register selected.
Show in Memory
Where enabled, this displays the Memory view with the address set to either:
  • The value of the selected expression, if the value translates to an address, for example the address of an array, &name
  • The location of the expression, for example the name of an array, name.
The memory size is set to the size of the expression, using the sizeof keyword.
Show Dereference in Memory
If the selected expression is a pointer, this displays the Memory view with the address set to the value of the expression.
Show in Disassembly
Where enabled, this displays the Disassembly view with the address set to the location of the expression.
Show Dereference in Disassembly
If the selected expression is a pointer, this displays the Disassembly view, with the address set to the value of the expression.
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.
Enable Watchpoint
Enables the watchpoint, if a watchpoint has been set on the selected variable.
Disable Watchpoint
Disables the watchpoint, if a watchpoint has been set on the selected variable.
Resolve Watchpoint
If a watchpoint has been set on the selected variable, this 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
Enables you to add register filters to an Expressions view. Displays a sub menu that enables you to add to a specific Expressions view.
<Format list>
A list of formats you can use for the expression value.
View Menu
The following View Menu options are available:
New Expressions View
Displays a new instance of the Expressions view.
Update View When Hidden
Enables the updating of the view when it is hidden behind other views. By default, this view does not update when hidden.
Freeze Data
Toggles the freezing of data in the current view. This also disables and enables the Refresh option.

Adding a new column header

Right-click on the column headers to select the columns that you want displayed:
Name
An expression that resolves to an address, such as main+1024, or a register, for example $R1.
Value
The value of the expression. You can modify a value that has a white background. A yellow background indicates that the value has changed. This might result from you either performing a debug action such as stepping or by you editing the value directly.
If you freeze the view, then you cannot change a value.
Type
The type associated with the value at the address identified by the expression.
Count
The number of array or pointer elements. You can edit a pointer element count.
Size
The size of the expression in bits.
Location
The address in hexadecimal identified by the expression, or the name of a register, if the expression contains only a single register name.
Access
The access type of the expression.
All columns are displayed by default.
Related reference
3.11 Setting a tracepoint
3.8 Conditional breakpoints
3.9 Assigning conditions to an existing breakpoint
3.10 Pending breakpoints and watchpoints
Chapter 11 DS-5 Debug Perspectives and Views
Non-ConfidentialPDF file icon PDF versionARM DUI0446W
Copyright © 2010-2015 ARM. All rights reserved.