Evaluating your expressions

The Expressions view lets you evaluate and examine the value of expressions. To show this view, choose Windows > Show View > Expressions .

Expressions view

Note: The Expressions view is similar to the Variables view; for more information, see the Inspecting variables section in this chapter.
To evaluate an expression:
  1. Right-click the Expressions view, and then choose Add Watch Expression.

    Expressions view; add expressions

  2. Enter the expression you want to evaluate (e.g. (x-5)*3 ).
  3. Click OK. The expression and its value appear in the Expressions view. When the debugger suspends the program's execution, it reevaluates all expressions and highlights the changed values.
Related concepts
Using breakpoints and watchpoints
Inspecting your registers
Inspecting a process's memory
Inspecting shared-library usage
Monitoring signal handling
Viewing your output
Interacting with GDB
Related tasks
Inspecting variables
Changing variable values
Controlling the display of variables
Changing variable to a different type
Viewing variables in memory