diff options
author | Eli Zaretskii <eliz@gnu.org> | 2010-09-22 09:13:31 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2010-09-22 09:13:31 +0000 |
commit | fccd1d1e5f52fe58263f77522339067e2a6064c8 (patch) | |
tree | b7b87c3025e22fa375196d6c99929a08877799e0 /gdb | |
parent | d48749734084702ffe2a535ece1d52f9aa6ac168 (diff) | |
download | gdb-fccd1d1e5f52fe58263f77522339067e2a6064c8.zip gdb-fccd1d1e5f52fe58263f77522339067e2a6064c8.tar.gz gdb-fccd1d1e5f52fe58263f77522339067e2a6064c8.tar.bz2 |
gdb.texinfo (Values From Inferior): Clarify that
value.dynamic_type works only in C++ programs with RTTI.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 18 |
2 files changed, 17 insertions, 6 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 579b7c5..b3ca8af 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2010-09-22 Eli Zaretskii <eliz@gnu.org> + + * gdb.texinfo (Values From Inferior): Clarify that + value.dynamic_type works only in C++ programs with RTTI. + 2010-09-15 Paul Bolle <pebolle@tiscali.nl> * gdb.texinfo (Character Sets): Correctly reference host-charset diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index b59ce0d..e5be509 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20762,12 +20762,18 @@ The type of this @code{gdb.Value}. The value of this attribute is a @defivar Value dynamic_type The dynamic type of this @code{gdb.Value}. This uses C@t{++} run-time -type information to determine the dynamic type of the value. If this -value is of class type, it will return the class in which the value is -embedded, if any. If this value is of pointer or reference to a class -type, it will compute the dynamic type of the referenced object, and -return a pointer or reference to that type, respectively. In all -other cases, it will return the value's static type. +type information (@acronym{RTTI}) to determine the dynamic type of the +value. If this value is of class type, it will return the class in +which the value is embedded, if any. If this value is of pointer or +reference to a class type, it will compute the dynamic type of the +referenced object, and return a pointer or reference to that type, +respectively. In all other cases, it will return the value's static +type. + +Note that this feature will only work when debugging a C@t{++} program +that includes @acronym{RTTI} for the object in question. Otherwise, +it will just return the static type of the value as in @kbd{ptype foo} +(@pxref{Symbols, ptype}). @end defivar @end table |