aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/guile.texi
diff options
context:
space:
mode:
authorGeorge Barrett <bob@bob131.so>2021-06-09 23:56:11 +1000
committerSimon Marchi <simon.marchi@polymtl.ca>2021-07-28 20:30:24 -0400
commitad42014be254b402f7a44e578cc709fe9e30dc1d (patch)
treec5074628919b7ddd2c1ef6162deb54d6cd627222 /gdb/doc/guile.texi
parent588f5af53224053162732baa630fe3bdd8d0195e (diff)
downloadgdb-ad42014be254b402f7a44e578cc709fe9e30dc1d.zip
gdb-ad42014be254b402f7a44e578cc709fe9e30dc1d.tar.gz
gdb-ad42014be254b402f7a44e578cc709fe9e30dc1d.tar.bz2
Guile: temporary breakpoints
Adds API to the Guile bindings for creating temporary breakpoints and querying whether an existing breakpoint object is temporary. This is effectively a transliteration of the Python implementation. It's worth noting that the added `is_temporary' flag is ignored in the watchpoint registration path. This replicates the behaviour of the Python implementation, but might be a bit surprising for users. gdb/ChangeLog: 2021-06-09 George Barrett <bob@bob131.so> * guile/scm-breakpoint.c (gdbscm_breakpoint_object::spec): Add is_temporary field. (temporary_keyword): Add keyword object for make-breakpoint argument parsing. (gdbscm_make_breakpoint): Accept #:temporary keyword argument and store the value in the allocated object's spec.is_temporary. (gdbscm_register_breakpoint_x): Pass the breakpoint's spec.is_temporary value to create_breakpoint. (gdbscm_breakpoint_temporary): Add breakpoint-temporary? procedure implementation. (breakpoint_functions::make-breakpoint): Update documentation string and fix a typo. (breakpoint_functions::breakpoint-temporary?): Add breakpoint-temporary? procedure. (gdbscm_initialize_breakpoints): Initialise temporary_keyword variable. NEWS (Guile API): Mention new temporary breakpoints API. gdb/doc/ChangeLog: 2021-06-09 George Barrett <bob@bob131.so> * guile.texi (Breakpoints In Guile): Update make-breakpoint documentation to reflect new #:temporary argument. Add documentation for new breakpoint-temporary? procedure. gdb/testsuite/ChangeLog: 2021-06-09 George Barrett <bob@bob131.so> * gdb.guile/scm-breakpoint.exp: Add additional tests for temporary breakpoints. Change-Id: I2de332ee7c256f5591d7141ab3ad50d31b871d17
Diffstat (limited to 'gdb/doc/guile.texi')
-rw-r--r--gdb/doc/guile.texi16
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/doc/guile.texi b/gdb/doc/guile.texi
index 36fc9a7..a2448dd 100644
--- a/gdb/doc/guile.texi
+++ b/gdb/doc/guile.texi
@@ -2965,7 +2965,7 @@ The following breakpoint-related procedures are provided by the
@code{(gdb)} module:
@c TODO: line length
-@deffn {Scheme Procedure} make-breakpoint location @r{[}#:type type@r{]} @r{[}#:wp-class wp-class@r{]} @r{[}#:internal internal@r{]}
+@deffn {Scheme Procedure} make-breakpoint location @r{[}#:type type@r{]} @r{[}#:wp-class wp-class@r{]} @r{[}#:internal internal@r{]} @r{[}#:temporary temporary@r{]}
Create a new breakpoint at @var{location}, 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,
@@ -2991,6 +2991,11 @@ registered, nor will it be listed in the output from @code{info breakpoints}
If an internal flag is not provided, the breakpoint is visible
(non-internal).
+The optional @var{temporary} argument makes the breakpoint a temporary
+breakpoint. Temporary breakpoints are deleted after they have been hit,
+after which the Guile breakpoint is no longer usable (although it may be
+re-registered with @code{register-breakpoint!}).
+
When a watchpoint is created, @value{GDBN} will try to create a
hardware assisted watchpoint. If successful, the type of the watchpoint
is changed from @code{BP_WATCHPOINT} to @code{BP_HARDWARE_WATCHPOINT}
@@ -3087,6 +3092,15 @@ Return the breakpoint's number --- the identifier used by
the user to manipulate the breakpoint.
@end deffn
+@deffn {Scheme Procedure} breakpoint-temporary? breakpoint
+Return @code{#t} if the breakpoint was created as a temporary
+breakpoint. Temporary breakpoints are automatically deleted after
+they've been hit. Calling this procedure, and all other procedures
+other than @code{breakpoint-valid?} and @code{register-breakpoint!},
+will result in an error after the breakpoint has been hit (since it has
+been automatically deleted).
+@end deffn
+
@deffn {Scheme Procedure} breakpoint-type breakpoint
Return the breakpoint's type --- the identifier used to
determine the actual breakpoint type or use-case.