Use the Expressions view to create and work with expressions.
Figure 15-17 Expressions view
- 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.
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+=1you must use
- Edit expressions
You can edit the values of expressions in the Value field. Select the value and edit it.
The following options are available from the toolbar menu:
- Show all numerical values in hexadecimal
Click the button to change all numeric values to hexadecimal values. This works as a toggle and your preference is saved across sessions.
In the Expressions view, select the expression you want to remove from view, and click to remove the selected expression.
- Add New Expression
Click the button to add a new expression.
- Remove All Expressions
Click the button to remove all expressions.
Click the button to search through all expressions.
- Refresh Expressions View
Click the button to refresh or update the values in the view.
- View Menu
The following View Menu options are available:
- Link with
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.
- 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 option prevents automatic updating of the view. You can still use the Refresh option to manually refresh the view.
Right-click on the column headers to select the columns that you want displayed:
An expression that resolves to an address, such as
main+1024, or a register, for example
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.
The type associated with the value at the address identified by the expression.
The number of array or pointer elements. You can edit a pointer element count.
The size of the expression in bits.
The address in hexadecimal identified by the expression, or the name of a register, if the expression contains only a single register name.
The access type of the expression.
- Show All Columns
Displays all columns.
- Reset Columns
Resets the columns displayed and their widths to the default.
All columns are displayed by default.
- When debugging the Linux kernel, to view its internal thread structure,use these expressions:
For Arm®v8 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)