Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Justin Lebar <jlebar@google.com>
To: gdb-patches@sourceware.org
Cc: Justin Lebar <jlebar@google.com>
Subject: Re: [PATCH v2] Fix documentation for Type.template_argument.
Date: Sun, 06 Jul 2014 17:57:00 -0000	[thread overview]
Message-ID: <CAMuNMfouo1ZX5GNx2T5Sk0HEb9AiY7spYgur-cXZeJCeduMB3g@mail.gmail.com> (raw)
In-Reply-To: <1403649524-10769-1-git-send-email-jlebar@google.com>

Ping on this patch?  (Would it be appropriate to find the last person
to touch this documentation and cc him/her, or do something else like
that?)

Regards,
-Justin

On Tue, Jun 24, 2014 at 3:38 PM, Justin Lebar <jlebar@google.com> wrote:
> In the Python API, Type.template_argument(n) returns either a gdb.Type
> or a gdb.Value, depending on whether the n'th template argument is a C++
> type or a C++ value.
>
> Also add a note that Type.template_argument(n) throws an exception if n
> is out of range (as opposed to, say, returning None).
>
> There's one piece of the documentation I still don't understand:
>
>> If block is given, then name is looked up in that scope. Otherwise, it
>> is searched for globally.
>
> What is 'name', exactly, and why are we looking it up?  I'd be happy to
> fix this up if we could clarify this, but otherwise this patch stands on
> its own.
>
> 2014-06-18  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.
> ---
>  gdb/doc/python.texi | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
> index 4688783..266af80 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.
> --
> 2.0.0.526.g5318336
>


  reply	other threads:[~2014-07-06 17:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 22:38 Justin Lebar
2014-07-06 17:57 ` Justin Lebar [this message]
2014-07-07 14:42   ` Joel Brobecker
2014-07-07 15:32     ` Eli Zaretskii
2014-07-07 17:29       ` Justin Lebar
2014-07-07 17:44         ` Eli Zaretskii
2014-08-17 18:25           ` Doug Evans
2014-09-02 22:13             ` Justin Lebar
2014-09-02 22:24               ` Doug Evans
2014-09-03 23:44                 ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuNMfouo1ZX5GNx2T5Sk0HEb9AiY7spYgur-cXZeJCeduMB3g@mail.gmail.com \
    --to=jlebar@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox