Message ID | 1403649524-10769-1-git-send-email-jlebar@google.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 10515 invoked by alias); 24 Jun 2014 22:38:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 10503 invoked by uid 89); 24 Jun 2014 22:38:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-yk0-f202.google.com Received: from mail-yk0-f202.google.com (HELO mail-yk0-f202.google.com) (209.85.160.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 24 Jun 2014 22:38:48 +0000 Received: by mail-yk0-f202.google.com with SMTP id 19so33680ykq.1 for <gdb-patches@sourceware.org>; Tue, 24 Jun 2014 15:38:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=v/wBgPbHJjKhZUd4VZ8PxfJGLEBh7ogBOuvxZUSlbfY=; b=hgoOAUsBEafRqq4KM0N4oob34BLKSqRY1ProduM24ppWmunGOBTm4QpRGEoOlr7NQ4 fQQtr5iBqbOPIJ7TjWg6+7FBQx4XCzGFvNkkcyhztX0mgT1sjuXfTPshwHHV2OtT1sgR LWgiUDNRwTnsgAC4a47GooLCtJbZj16SBr1GgC2mkVWSuDn37yBjOCI91zFenRhfMmYQ RSNMNyIfgnpVynC4FY/e9x2XHd5Wk8sQD+rA3aSR3XKeyUose5xUCPeokKxfNYmsLjWT D3XgS1ynMijUlXzrX7jA+by0pSF1pMtYE7Dqhv5KfFR3WAMKnbi1vMucuaomrnClxI9J QzeQ== X-Gm-Message-State: ALoCoQlfqI0+LZy+owbmn3pVKGjVdF0G9trz2IObpLmk+mVslpaZ/2EQw6cqlAw3j549G1Kz+Zfa X-Received: by 10.58.29.67 with SMTP id i3mr2129328veh.3.1403649526912; Tue, 24 Jun 2014 15:38:46 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id o69si147879yhp.6.2014.06.24.15.38.46 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Jun 2014 15:38:46 -0700 (PDT) Received: from jlebar0.mtv.corp.google.com (jlebar0.mtv.corp.google.com [172.17.132.58]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id B857A5A4837; Tue, 24 Jun 2014 15:38:46 -0700 (PDT) Received: by jlebar0.mtv.corp.google.com (Postfix, from userid 214119) id 581A91A0BFE; Tue, 24 Jun 2014 15:38:46 -0700 (PDT) From: Justin Lebar <jlebar@google.com> To: gdb-patches@sourceware.org Cc: Justin Lebar <jlebar@google.com> Subject: [PATCH v2] Fix documentation for Type.template_argument. Date: Tue, 24 Jun 2014 15:38:44 -0700 Message-Id: <1403649524-10769-1-git-send-email-jlebar@google.com> |
Commit Message
Justin Lebar
June 24, 2014, 10:38 p.m. UTC
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(-)
Comments
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 >
> 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?) No, Eli is the person to review this patch, not the last person to touch it. Maybe he is away at the moment.
> Date: Mon, 7 Jul 2014 07:42:50 -0700 > From: Joel Brobecker <brobecker@adacore.com> > Cc: gdb-patches@sourceware.org > > > 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?) > > No, Eli is the person to review this patch, not the last person to > touch it. Maybe he is away at the moment. I'm not away, I just remembered that I already reviewed this patch and responded with the review on the same day. It looks now that my response didn't make it to the list for some reason, because I see it in my FCC archive, but not in the list archives. So here's my response as I wrote it back then: > From: Justin Lebar <jlebar@google.com> > Cc: Justin Lebar <jlebar@google.com> > Date: Tue, 24 Jun 2014 12:01:36 -0700 > > -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 N template arguments, this will throw an exception. Ordinarily, ^ @var{n} Otherwise, the patch is OK Texinfo-wise; I don't know enough about these issues to tell whether the content is correct, nor can I answer your question. Thanks.
> I'm not away, I just remembered that I already reviewed this patch and > responded with the review on the same day. Indeed, and although there may have been a problem with the list, I got your response and sent a fixed patch. But maybe I misunderstood your response? > Otherwise, the patch is OK Texinfo-wise; I don't know enough about > these issues to tell whether the content is correct I thought this indicated I should wait for someone else to chime in? Or were you saying this was OK to submit with this change? Sorry, I'm obviously new here. :) -Justin On Mon, Jul 7, 2014 at 8:32 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> Date: Mon, 7 Jul 2014 07:42:50 -0700 >> From: Joel Brobecker <brobecker@adacore.com> >> Cc: gdb-patches@sourceware.org >> >> > 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?) >> >> No, Eli is the person to review this patch, not the last person to >> touch it. Maybe he is away at the moment. > > I'm not away, I just remembered that I already reviewed this patch and > responded with the review on the same day. > > It looks now that my response didn't make it to the list for some > reason, because I see it in my FCC archive, but not in the list > archives. > > So here's my response as I wrote it back then: > > > From: Justin Lebar <jlebar@google.com> > > Cc: Justin Lebar <jlebar@google.com> > > Date: Tue, 24 Jun 2014 12:01:36 -0700 > > > > -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 N template arguments, this will throw an exception. Ordinarily, > ^ > @var{n} > > Otherwise, the patch is OK Texinfo-wise; I don't know enough about > these issues to tell whether the content is correct, nor can I answer > your question. > > Thanks. >
> From: Justin Lebar <jlebar@google.com> > Date: Mon, 7 Jul 2014 10:28:58 -0700 > Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org > > > Otherwise, the patch is OK Texinfo-wise; I don't know enough about > > these issues to tell whether the content is correct > > I thought this indicated I should wait for someone else to chime in? You understood correctly. Since you are correcting existing documentation, I think it would be good if someone who knows that stuff looked at the corrections from the contents point of view and approved them. Thanks.
On Mon, Jul 7, 2014 at 10:43 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> From: Justin Lebar <jlebar@google.com> >> Date: Mon, 7 Jul 2014 10:28:58 -0700 >> Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org >> >> > Otherwise, the patch is OK Texinfo-wise; I don't know enough about >> > these issues to tell whether the content is correct >> >> I thought this indicated I should wait for someone else to chime in? > > You understood correctly. Since you are correcting existing > documentation, I think it would be good if someone who knows that > stuff looked at the corrections from the contents point of view and > approved them. > > Thanks. Content-wise, the patch is ok with me.
Can we finally submit this patch, or is there something else I need to do here? On Sun, Aug 17, 2014 at 11:25 AM, Doug Evans <dje@google.com> wrote: > On Mon, Jul 7, 2014 at 10:43 AM, Eli Zaretskii <eliz@gnu.org> wrote: >>> From: Justin Lebar <jlebar@google.com> >>> Date: Mon, 7 Jul 2014 10:28:58 -0700 >>> Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org >>> >>> > Otherwise, the patch is OK Texinfo-wise; I don't know enough about >>> > these issues to tell whether the content is correct >>> >>> I thought this indicated I should wait for someone else to chime in? >> >> You understood correctly. Since you are correcting existing >> documentation, I think it would be good if someone who knows that >> stuff looked at the corrections from the contents point of view and >> approved them. >> >> Thanks. > > Content-wise, the patch is ok with me.
Yeah, it's good to go. On Tue, Sep 2, 2014 at 3:13 PM, Justin Lebar <jlebar@google.com> wrote: > Can we finally submit this patch, or is there something else I need to do here? > > On Sun, Aug 17, 2014 at 11:25 AM, Doug Evans <dje@google.com> wrote: >> On Mon, Jul 7, 2014 at 10:43 AM, Eli Zaretskii <eliz@gnu.org> wrote: >>>> From: Justin Lebar <jlebar@google.com> >>>> Date: Mon, 7 Jul 2014 10:28:58 -0700 >>>> Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org >>>> >>>> > Otherwise, the patch is OK Texinfo-wise; I don't know enough about >>>> > these issues to tell whether the content is correct >>>> >>>> I thought this indicated I should wait for someone else to chime in? >>> >>> You understood correctly. Since you are correcting existing >>> documentation, I think it would be good if someone who knows that >>> stuff looked at the corrections from the contents point of view and >>> approved them. >>> >>> Thanks. >> >> Content-wise, the patch is ok with me.
On Tue, Sep 2, 2014 at 3:24 PM, Doug Evans <dje@google.com> wrote: > Yeah, it's good to go. > > > On Tue, Sep 2, 2014 at 3:13 PM, Justin Lebar <jlebar@google.com> wrote: >> Can we finally submit this patch, or is there something else I need to do here? >> >> On Sun, Aug 17, 2014 at 11:25 AM, Doug Evans <dje@google.com> wrote: >>> On Mon, Jul 7, 2014 at 10:43 AM, Eli Zaretskii <eliz@gnu.org> wrote: >>>>> From: Justin Lebar <jlebar@google.com> >>>>> Date: Mon, 7 Jul 2014 10:28:58 -0700 >>>>> Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org >>>>> >>>>> > Otherwise, the patch is OK Texinfo-wise; I don't know enough about >>>>> > these issues to tell whether the content is correct >>>>> >>>>> I thought this indicated I should wait for someone else to chime in? >>>> >>>> You understood correctly. Since you are correcting existing >>>> documentation, I think it would be good if someone who knows that >>>> stuff looked at the corrections from the contents point of view and >>>> approved them. >>>> >>>> Thanks. >>> >>> Content-wise, the patch is ok with me. Hi. fyi, I've committed this.
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.