aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/python.texi
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2017-12-07 16:47:33 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2017-12-07 16:47:33 +0000
commit824cc835aa9a4d585d955db4ab2a5dd4c17cc22c (patch)
tree8f0ee6f88956328aea665e4016ea7ae09274c6bd /gdb/doc/python.texi
parent9c226a8689db8bced43b94f551e118551219ce54 (diff)
downloadgdb-824cc835aa9a4d585d955db4ab2a5dd4c17cc22c.zip
gdb-824cc835aa9a4d585d955db4ab2a5dd4c17cc22c.tar.gz
gdb-824cc835aa9a4d585d955db4ab2a5dd4c17cc22c.tar.bz2
Implement explicit locations for Python breakpoints.
This introduces several new keywords to the bppy_init constructor. The spec parameter is now optional but mutually exclusive to the explicit keywords source, label, function and line. gdb/ChangeLog 2017-12-07 Phil Muldoon <pmuldoon@redhat.com> * python/py-breakpoint.c (bppy_init): Use string_to_event_location over basic location code. Implement explicit location keywords. (bppy_init_validate_args): New function. * NEWS: Document Python explicit breakpoint locations. doc/ChangeLog 2017-12-07 Phil Muldoon <pmuldoon@redhat.com> * python.texi (Breakpoints In Python): Add text relating to allowed explicit locations and keywords in gdb.Breakpoints. testsuite/ChangeLog 2017-12-07 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-breakpoint.exp (test_bkpt_explicit_loc): Add new tests for explicit locations.
Diffstat (limited to 'gdb/doc/python.texi')
-rw-r--r--gdb/doc/python.texi41
1 files changed, 22 insertions, 19 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index f411f60..28a7a1a 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -4878,27 +4878,30 @@ represented as Python @code{Long} values.
Python code can manipulate breakpoints via the @code{gdb.Breakpoint}
class.
-@defun Breakpoint.__init__ (spec @r{[}, type @r{[}, wp_class @r{[},internal @r{[},temporary@r{]]]]})
+@defun Breakpoint.__init__ (spec @r{[}, type @r{[}, wp_class @r{[}, internal @r{[}, temporary @r{]}, source @r{]}, function @r{]}, label @r{]}, line @r{]]]]]]]]})
Create a new breakpoint according to @var{spec}, which is a string
naming the location of the breakpoint, or an expression that defines a
-watchpoint. The contents can be any location recognized by the
-@code{break} command, or in the case of a watchpoint, by the
-@code{watch} command. 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 @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 created, nor will it be
-listed in the output from @code{info breakpoints} (but will be listed
-with the @code{maint info 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 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.
+watchpoint. The contents can be any location recognized by the
+@code{break} command or, in the case of a watchpoint, by the
+@code{watch} command. Alternatively, create a new a explicit location
+breakpoint (@pxref{Explicit Locations}) according to the
+specifications contained in the key words @var{source},
+@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
+@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
+created, nor will it be listed in the output from @code{info
+breakpoints} (but will be listed with the @code{maint info
+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
+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.
@end defun
The available types are represented by constants defined in the @code{gdb}