
72
Chapter 10. Examining Data
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 once again.
10.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 print address on
{No value for ‘
listitem>GDBN’} prints memory addresses showing the location 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)
set print address off
Do not print addresses when displaying their contents. For example, this is the same stack frame
displayed with
set print address off
:
(gdb) set print addr off
(gdb) f
#0
set_quotes (lq="
", rq="
") at input.c:530
530
if (lquote != def_lquote)
Summary of Contents for ENTERPRISE LINUX 3 - SECURITY GUIDE
Page 1: ...Red Hat Enterprise Linux 3 Debugging with gdb ...
Page 12: ...2 Chapter 1 Debugging with gdb ...
Page 28: ...18 Chapter 4 Getting In and Out of gdb ...
Page 34: ...24 Chapter 5 gdb Commands ...
Page 44: ...34 Chapter 6 Running Programs Under gdb ...
Page 68: ...58 Chapter 8 Examining the Stack ...
Page 98: ...88 Chapter 10 Examining Data ...
Page 112: ...102 Chapter 12 Tracepoints ...
Page 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Page 138: ...128 Chapter 14 Using gdb with Different Languages ...
Page 144: ...134 Chapter 15 Examining the Symbol Table ...
Page 170: ...160 Chapter 19 Debugging remote programs ...
Page 198: ...188 Chapter 21 Controlling gdb ...
Page 204: ...194 Chapter 22 Canned Sequences of Commands ...
Page 206: ...196 Chapter 23 Command Interpreters ...
Page 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Page 296: ...286 Chapter 27 gdb Annotations ...
Page 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Page 322: ...312 Chapter 30 Using History Interactively ...
Page 362: ...352 Appendix D gdb Remote Serial Protocol ...
Page 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Page 386: ...376 Appendix G GNU Free Documentation License ...
Page 410: ......