]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Improve Type.template_argument docs in Python API.
authorJustin Lebar <jlebar@google.com>
Wed, 3 Sep 2014 23:40:22 +0000 (16:40 -0700)
committerDoug Evans <dje@google.com>
Wed, 3 Sep 2014 23:40:22 +0000 (16:40 -0700)
gdb/doc/ChangeLog:

* python.texi (Types In Python): Type.template_argument(n) returns a
gdb.Value or a gdb.Type and throws an exception if n is out of
range.

gdb/doc/ChangeLog
gdb/doc/python.texi

index 767a598c0bd004f8b43f80aae6b9e04dfbcced5f..2b453e7ef69036d3b8240e7bb98ec4eb5735c3d3 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-03  Justin Lebar <jlebar@google.com>
+
+       * python.texi (Types In Python): Type.template_argument(n) returns a
+       gdb.Value or a gdb.Type and throws an exception if n is out of
+       range.
+
 2014-09-03  Sasha Smundak  <asmundak@google.com>
 
        * python.texi (Frames in Python): Add read_register description.
index 3cb6bf8b28bc6ae81fbda0a32525ca3f7d2a48c0..9f44948ddcf5d5ced44b1ba2d172cd9aae018b28 100644 (file)
@@ -1048,11 +1048,12 @@ exception.
 
 @defun Type.template_argument (n @r{[}, block@r{]})
 If this @code{gdb.Type} is an instantiation of a template, this will
-return a new @code{gdb.Type} which represents the type of the
-@var{n}th template argument.
+return a new @code{gdb.Value} or @code{gdb.Type} which represents the
+value of the @var{n}th template argument (indexed starting at 0).
 
-If this @code{gdb.Type} is not a template type, this will throw an
-exception.  Ordinarily, only C@t{++} code will have template types.
+If this @code{gdb.Type} is not a template type, or if the type has fewer
+than @var{n} template arguments, this will throw an exception.
+Ordinarily, only C@t{++} code will have template types.
 
 If @var{block} is given, then @var{name} is looked up in that scope.
 Otherwise, it is searched for globally.