aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-09-08 13:44:24 -0600
committerTom Tromey <tom@tromey.com>2018-09-10 07:44:28 -0600
commit9da10427ddcfae7313c462f729407e0c7c59e2d8 (patch)
tree5fe483d81f0efe9df4f6b730689dcd3726ac2047 /gdb/doc
parent0d2a583976a87221d11c2639ede8f764e0c26059 (diff)
downloadbinutils-9da10427ddcfae7313c462f729407e0c7c59e2d8.zip
binutils-9da10427ddcfae7313c462f729407e0c7c59e2d8.tar.gz
binutils-9da10427ddcfae7313c462f729407e0c7c59e2d8.tar.bz2
Mention virtual tables in Python dynamic_type documentation
PR python/16461 asks that the Python dynamic_type documentation mention virtual tables; this patch implements that request. gdb/doc/ChangeLog 2018-09-10 Tom Tromey <tom@tromey.com> PR python/16461: * python.texi (Values From Inferior): Mention use of virtual table.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/python.texi16
2 files changed, 14 insertions, 8 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 642bc54..e1a3c86 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,5 +1,11 @@
2018-09-10 Tom Tromey <tom@tromey.com>
+ PR python/16461:
+ * python.texi (Values From Inferior): Mention use of virtual
+ table.
+
+2018-09-10 Tom Tromey <tom@tromey.com>
+
* python.texi (Basic Python): Parenthesize argument to
decode_line.
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 6eccc2b..e310c16 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -658,14 +658,14 @@ The type of this @code{gdb.Value}. The value of this attribute is a
@end defvar
@defvar Value.dynamic_type
-The dynamic type of this @code{gdb.Value}. This uses C@t{++} run-time
-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.
+The dynamic type of this @code{gdb.Value}. This uses the object's
+virtual table and the C@t{++} run-time 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,