Go to main content
Oracle® Developer Studio 12.5: Debugging a Program with dbx

Exit Print View

Updated: June 2016
 
 

display Command

In native mode, the display command re-evaluates and prints expressions at every stopping point. In Java mode, the display command evaluates and prints expressions, local variables, or parameters at every stopping point. Object references are expanded to one level and arrays are printed itemwise.

The expression is parsed for the current scope at the time you type the command and reevaluated at every stopping point. Because the expression is parsed at entry time, the correctness of the expression can be immediately verified.

If you are running dbx in the IDE or dbxtool in the Sun Studio 12 release, the Sun Studio 12 Update 1 release, the Oracle Solaris Studio 12.2 release, or later updated releases, the display expression command effectively behaves like a watch $(which expression) command.

Native Mode Syntax

display

Print the list of expressions being displayed.

display expression, ...

Display the value of expressions expression, ... at every stopping point. Because expression is parsed at entry time, the correctness of the expression is immediately verified.

display [-r|+r|-d|+d|-S|+S|-p|+p|-L|-fformat|-Fformat|-m|+m|--] expression, ...

See print Command for the meaning of these flags.

where:

expression is a valid expression.

format is the output format you want used to print the expression. For information on valid formats, see print Command.

Java Mode Syntax

display

Print the list of variables and parameters being displayed.

display expression|identifier, ...

Display the value of variables and parameters of identifier, ... at every stopping point.

display [-r|+r|-d|+d|-p|+p|-fformat|-Fformat|-Fformat|--] expression|identifier, ...

See print Command for the meaning of these flags.

where:

class-name is the name of a Java class. You can use either of the following:

  • The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner

  • The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.

expression is a valid Java expression.

field-name is the name of a field in the class.

format is the output format you want used to print the expression. For information about valid formats, see print Command.

identifier is a local variable or parameter, including this, the current class instance variable (object-name.field-name) or a class (static) variable (class-name.field-name).

object-name is the name of a Java object.