* [PATCH] Small fixes to the Python API doc
@ 2014-10-16 18:06 Simon Marchi
2014-10-16 18:18 ` Phil Muldoon
2014-10-16 18:38 ` Eli Zaretskii
0 siblings, 2 replies; 4+ messages in thread
From: Simon Marchi @ 2014-10-16 18:06 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
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".
---
gdb/doc/python.texi | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 81ec11b..bf12bf4 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -4250,7 +4250,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.
@@ -4258,7 +4258,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. You can use it to enable or disable the breakpoint.
+This attribute is writable.
@end defvar
@defvar Breakpoint.silent
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Small fixes to the Python API doc
2014-10-16 18:06 [PATCH] Small fixes to the Python API doc Simon Marchi
@ 2014-10-16 18:18 ` Phil Muldoon
2014-10-16 18:38 ` Eli Zaretskii
1 sibling, 0 replies; 4+ messages in thread
From: Phil Muldoon @ 2014-10-16 18:18 UTC (permalink / raw)
To: Simon Marchi, gdb-patches
On 16/10/14 19:06, Simon Marchi wrote:
> 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".
> ---
> gdb/doc/python.texi | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>
> @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
>
> @defvar Breakpoint.silent
No objections to the patch, but maybe we should "just have" a
disable() method even if it duplicates the functionality of the
enabled attribute. What do you think?
Cheers
Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Small fixes to the Python API doc
2014-10-16 18:06 [PATCH] Small fixes to the Python API doc Simon Marchi
2014-10-16 18:18 ` Phil Muldoon
@ 2014-10-16 18:38 ` Eli Zaretskii
2014-10-20 17:32 ` Simon Marchi
1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2014-10-16 18:38 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches, simon.marchi
> From: Simon Marchi <simon.marchi@ericsson.com>
> CC: Simon Marchi <simon.marchi@ericsson.com>
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Small fixes to the Python API doc
2014-10-16 18:38 ` Eli Zaretskii
@ 2014-10-20 17:32 ` Simon Marchi
0 siblings, 0 replies; 4+ messages in thread
From: Simon Marchi @ 2014-10-20 17:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
On 2014-10-16 02:38 PM, Eli Zaretskii wrote:
>> From: Simon Marchi <simon.marchi@ericsson.com>
>> CC: Simon Marchi <simon.marchi@ericsson.com>
>> 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 <simon.marchi@ericsson.com>
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 <simon.marchi@ericsson.com>
+
+ * python.texi (Breakpoints In Python): Add parenthesis after
+ Breakpoint.delete. Clarify Breakpoint.enabled description so
+ that it contains "disable".
+
2014-10-17 Doug Evans <dje@google.com>
* 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-20 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-16 18:06 [PATCH] Small fixes to the Python API doc Simon Marchi
2014-10-16 18:18 ` Phil Muldoon
2014-10-16 18:38 ` Eli Zaretskii
2014-10-20 17:32 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox