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.

display

Display the current values of the expressions on

 

the list, just as is done when your program stops.

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.

If a display expression refers to local variables, then it does not make sense outside the lexical context for which it was set up. Such an expression is disabled when execution enters a context where one of its variables is not defined. For example, if you give the command display last_char while inside a function with an argument last_char, GDB displays this argument while your program continues to stop inside that function. When it stops elsewhere, where there is no variable last_char, the display is disabled automatically. The next time your program stops where last_char is meaningful, you can enable the display expression again.

8.7 Print settings

GDB provides the following ways to control how arrays, structures, and symbols are printed.

These settings are useful for debugging programs in any language:

set print address, set GDB prints memory addresses showing the location

print address on of stack traces, structure values, pointer values, breakpoints, and so forth, even when it also displays the contents of those addresses. The default is on. For example, this is what a stack frame display looks like with set print address on:

((gdb)) f

#0 set_quotes (lq=0x34c78 "<<", rq=0x34c88 ">>")

at input.c:530

530 if (lquote != def_lquote)

90 Examining Data

Page 90
Image 90
HP gnu source-level debugger 5992-4701 manual Print settings