Chapter 10. Examining Data
77
set print static-members
set print static-members on
Print static members when displaying a C
++
object. The default is on.
set print static-members off
Do not print static members when displaying a C
++
object.
show print static-members
Show whether C
++
static members are printed, or not.
set print vtbl
set print vtbl on
Pretty print C
++
virtual function tables. The default is off. (The
vtbl
commands do not work
on programs compiled with the HP ANSI C
++
compiler (
aCC
).)
set print vtbl off
Do not pretty print C
++
virtual function tables.
show print vtbl
Show whether C
++
virtual function tables are pretty printed, or not.
10.8. Value history
Values printed by the
command are saved in the gdb
value history
. This allows you to refer to
them in other expressions. Values are kept until the symbol table is re-read or discarded (for example
with the
file
or
symbol-file
commands). When the symbol table changes, the value history is
discarded, since the values may contain pointers back to the types defined in the symbol table.
The values printed are given
history numbers
by which you can refer to them. These are successive
integers starting with one.
shows you the history number assigned to a value by printing
$
num
=
before the value; here
num
is the history number.
To refer to any previous value, use
$
followed by the value’s history number. The way
labels
its output is designed to remind you of this. Just
$
refers to the most recent value in the history, and
$$
refers to the value before that.
$$
n
refers to the
n
th value from the end;
$$2
is the value just prior
to
$$
,
$$1
is equivalent to
$$
, and
$$0
is equivalent to
$
.
For example, suppose you have just printed a pointer to a structure and want to see the contents of the
structure. It suffices to type
p *$
If you have a chain of structures where the component
next
points to the next one, you can print the
contents of the next one with this:
p *$.next
You can print successive links in the chain by repeating this command--which you can do by just
typing [RET].
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: ......