[python] Allow explicit locations in breakpoints.

Eli Zaretskii eliz@gnu.org
Fri Nov 17 13:31:00 GMT 2017


> From: Phil Muldoon <pmuldoon@redhat.com>
> Date: Fri, 17 Nov 2017 11:02:08 +0000
> 
> I just realised this needs a doc review also.

Doc review coming up.

> diff --git a/gdb/NEWS b/gdb/NEWS
> index 9246659bfb..592fe70156 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -24,6 +24,9 @@
>       gdb.new_thread are emitted.  See the manual for further
>       description of these.
>  
> +  ** Python breakpoints can now accept explicit locations.  See the
> +     manual for a further description of this feature.

I think "a further" should lose the "a" part.  Also, how about
mentioning the node name in the manual where this is described?

> +watchpoint. The contents can be any location recognized by the
             ^^
Two spaces here, please.

> +@code{break} command or, in the case of a watchpoint, by the
> +@code{watch} command.  Alternatively, create a new a explicit location
                                         ^^^^^^^^^^^^^^^^^^^^^^^
The second "a" should be deleted.

> +@var{function}, @var{label} and @var{line}.  The optional @var{type}
> +denotes the breakpoint to create from the types defined later in this
> +chapter.  This argument can be either @code{gdb.BP_BREAKPOINT} or

I think "denotes the breakpoint to create from the types" is at least
confusing.  What did you mean here?

> +@code{gdb.BP_WATCHPOINT}; it defaults to @code{gdb.BP_BREAKPOINT}.
> +The optional @var{internal} argument allows the breakpoint to become
> +invisible to the user.  The breakpoint will neither be reported when
                        ^
I think you want a colon here, not a period, because the next sentence
explains what does it mean for a breakpoint to be "invisible".
Alternatively, start the next sentence with "Invisible breakpoints
will neither be reported ...".

> +created, nor will it be listed in the output from @code{info
> +breakpoints} (but will be listed with the @code{maint info
                                    ^^^^
"by", I think, not "with".

> +breakpoints} command).  The optional @var{temporary} argument makes
> +the breakpoint a temporary breakpoint.  Temporary breakpoints are
> +deleted after they have been hit.  Any further access to the Python
> +breakpoint after it has been hit will result in a runtime error (as

I think you want to say "to the temporary breakpoint" here.  The fact
that it is a Python breakpoint is not really relevant.

> +that breakpoint has now been automatically deleted).  The optional
> +@var{wp_class} argument defines the class of watchpoint to create, if
> +@var{type} is @code{gdb.BP_WATCHPOINT}.  If a watchpoint class is not
> +provided, it is assumed to be a @code{gdb.WP_WRITE} class.

What are the other supported classes?  Either state that here or point
to where that is described.

Thanks.



More information about the Gdb-patches mailing list