diff options
author | Justin Lebar <jlebar@google.com> | 2014-09-03 16:40:22 -0700 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-09-03 16:40:22 -0700 |
commit | 1a6a384be101ba422f6d3deba014dabe38cdb7a1 (patch) | |
tree | 887fd1dc4a7179a3af09c5f26b4b7557b51dac52 /gdb | |
parent | 5f3b99cfed3803f0b099152f54aac7cb90a2b926 (diff) | |
download | fsf-binutils-gdb-1a6a384be101ba422f6d3deba014dabe38cdb7a1.zip fsf-binutils-gdb-1a6a384be101ba422f6d3deba014dabe38cdb7a1.tar.gz fsf-binutils-gdb-1a6a384be101ba422f6d3deba014dabe38cdb7a1.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/doc/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/doc/python.texi | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 767a598..2b453e7 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -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. diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 3cb6bf8..9f44948 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -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. |