Next: , Previous: , Up: Debugger Command Reference   [Contents][Index]


4.10 Automatic display (‘display’, ‘undisplay’)

If you find that you want to print the value of an expression frequently (to see how it changes), you might want to add it to the automatic display list so that the BASH debugger evaluates a statement each time your program stops. Each expression added to the list is given a number to identify it; to remove an expression from the list, you specify that number. The automatic display looks like this:

2 (echo $x): 38

This display shows item numbers, expressions and their current values.

display expr

Add the expression expr to the list of expressions to display each time your program stops.

display

Display the current values of the expressions on the list, just as is done when your program stops.

undisplay dnums
delete display dnums

Remove item numbers dnums from the list of expressions to display.

undisplay does not repeat if you press RET after using it. (Otherwise you would just get the error ‘No display number …’.)

disable display dnums

Disable the display of item numbers dnums. A disabled display item is not printed automatically, but is not forgotten. It may be enabled again later.

enable display dnums

Enable display of item numbers dnums. It becomes effective once again in auto display of its expression, until you specify otherwise.

info display

Print the list of expressions previously set up to display automatically, each one with its item number, but without showing the values. This includes disabled expressions, which are marked as such. It also includes expressions which would not be displayed right now because they refer to automatic variables not currently available.


Next: , Previous: , Up: Debugger Command Reference   [Contents][Index]