From patchwork Mon Oct 20 17:32:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 3290 Received: (qmail 26552 invoked by alias); 20 Oct 2014 17:32:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 26522 invoked by uid 89); 20 Oct 2014 17:32:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg21.ericsson.net Received: from usevmg21.ericsson.net (HELO usevmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 20 Oct 2014 17:32:30 +0000 Received: from EUSAAHC005.ericsson.se (Unknown_Domain [147.117.188.87]) by usevmg21.ericsson.net (Symantec Mail Security) with SMTP id E4.C0.25146.63DE4445; Mon, 20 Oct 2014 13:08:39 +0200 (CEST) Received: from [142.133.110.254] (147.117.188.8) by smtps-am.internal.ericsson.com (147.117.188.87) with Microsoft SMTP Server (TLS) id 14.3.174.1; Mon, 20 Oct 2014 13:32:27 -0400 Message-ID: <5445472A.9000200@ericsson.com> Date: Mon, 20 Oct 2014 13:32:26 -0400 From: Simon Marchi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Eli Zaretskii CC: Subject: Re: [PATCH] Small fixes to the Python API doc References: <1413482796-3090-1-git-send-email-simon.marchi@ericsson.com> <83k33z3lnd.fsf@gnu.org> In-Reply-To: <83k33z3lnd.fsf@gnu.org> X-IsSubscribed: yes On 2014-10-16 02:38 PM, Eli Zaretskii wrote: >> From: Simon Marchi >> CC: Simon Marchi >> Date: Thu, 16 Oct 2014 14:06:36 -0400 >> >> First: >> "Breakpoint.delete" is missing parenthesis. > > I was going to say it doesn't need them, since it doesn't accept any > arguments, but then I saw that we already use those empty parens > everywhere. > > So, reluctantly, OK for the parens. > >> @defvar Breakpoint.enabled >> This attribute is @code{True} if the breakpoint is enabled, and >> -@code{False} otherwise. This attribute is writable. >> +@code{False} otherwise. You can use it to enable or disable the breakpoint. >> +This attribute is writable. >> @end defvar > > The order is wrong: first say that it's writable, then that it can be > used to enable/disable. > > OK with that change. > > Thanks. > Thanks, pushed with your change: commit fab3a15dfb4255e9d5a79536518ccdbed4e66e23 Author: Simon Marchi Date: Mon Oct 20 13:29:36 2014 -0400 Small fixes to the Python API doc First: "Breakpoint.delete" is missing parenthesis. Second: Someone on IRC asked, how come there is no disable() method in the Breakpoint object. It turns out you have to do "bp.enabled = False". Since every normal person would probably search for "disable" in that page if their intent is to disable a python breakpoint, I thought it would be useful if the description contained "disable" so it would be easy to find. The result might seem a bit silly and redundant, so I am open to suggestions. gdb/doc/ChangeLog: * python.texi (Breakpoints In Python): Add parenthesis after Breakpoint.delete. Clarify Breakpoint.enabled description so that it contains "disable". diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 474c1af..f1b2329 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,9 @@ +2014-10-20 Simon Marchi + + * python.texi (Breakpoints In Python): Add parenthesis after + Breakpoint.delete. Clarify Breakpoint.enabled description so + that it contains "disable". + 2014-10-17 Doug Evans * python.texi (Events In Python): Document clear_objfiles event. diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 43663d8..f1fd841 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -4265,7 +4265,7 @@ watchpoint scope, the watchpoint remains valid even if execution of the inferior leaves the scope of that watchpoint. @end defun -@defun Breakpoint.delete +@defun Breakpoint.delete () Permanently deletes the @value{GDBN} breakpoint. This also invalidates the Python @code{Breakpoint} object. Any further access to this object's attributes or methods will raise an error. @@ -4273,7 +4273,8 @@ to this object's attributes or methods will raise an error. @defvar Breakpoint.enabled This attribute is @code{True} if the breakpoint is enabled, and -@code{False} otherwise. This attribute is writable. +@code{False} otherwise. This attribute is writable. You can use it to enable +or disable the breakpoint. @end defvar @defvar Breakpoint.silent