Improve Type.template_argument docs in Python API.

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.
This commit is contained in:
Justin Lebar 2014-09-03 16:40:22 -07:00 committed by Doug Evans
parent 5f3b99cfed
commit 1a6a384be1
2 changed files with 11 additions and 4 deletions

View 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> 2014-09-03 Sasha Smundak <asmundak@google.com>
* python.texi (Frames in Python): Add read_register description. * python.texi (Frames in Python): Add read_register description.

View File

@ -1048,11 +1048,12 @@ exception.
@defun Type.template_argument (n @r{[}, block@r{]}) @defun Type.template_argument (n @r{[}, block@r{]})
If this @code{gdb.Type} is an instantiation of a template, this will 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 return a new @code{gdb.Value} or @code{gdb.Type} which represents the
@var{n}th template argument. 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 If this @code{gdb.Type} is not a template type, or if the type has fewer
exception. Ordinarily, only C@t{++} code will have template types. 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. If @var{block} is given, then @var{name} is looked up in that scope.
Otherwise, it is searched for globally. Otherwise, it is searched for globally.