[12/14] Mention virtual tables in Python dynamic_type documentation

Message ID 20180908201417.13444-13-tom@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey Sept. 8, 2018, 8:14 p.m. UTC
  PR python/16461 asks that the Python dynamic_type documentation
mention virtual tables; this patch implements that request.

gdb/doc/ChangeLog
2018-09-08  Tom Tromey  <tom@tromey.com>

	PR python/16461:
	* python.texi (Values From Inferior): Mention use of virtual
	table.
---
 gdb/doc/ChangeLog   |  6 ++++++
 gdb/doc/python.texi | 16 ++++++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)
  

Comments

Eli Zaretskii Sept. 8, 2018, 9:13 p.m. UTC | #1
> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>
> Date: Sat,  8 Sep 2018 14:14:15 -0600
> 
> PR python/16461 asks that the Python dynamic_type documentation
> mention virtual tables; this patch implements that request.
> 
> gdb/doc/ChangeLog
> 2018-09-08  Tom Tromey  <tom@tromey.com>
> 
> 	PR python/16461:
> 	* python.texi (Values From Inferior): Mention use of virtual
> 	table.

OK, thanks.
  

Patch

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 6eccc2b1154..e310c16c0a9 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,