mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-30 06:50:31 +02:00
(Location Traps): Corrected to reflect that
location traps now specify a specific position, not a range of positions. (Trap Shorthands): Depersonalize.
This commit is contained in:
parent
7bd29fa116
commit
7e1e0a213b
2 changed files with 27 additions and 25 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-03-19 Neil Jerram <neil@ossau.uklinux.net>
|
||||||
|
|
||||||
|
* api-debug.texi (Location Traps): Corrected to reflect that
|
||||||
|
location traps now specify a specific position, not a range of
|
||||||
|
positions.
|
||||||
|
(Trap Shorthands): Depersonalize.
|
||||||
|
|
||||||
2008-03-18 Neil Jerram <neil@ossau.uklinux.net>
|
2008-03-18 Neil Jerram <neil@ossau.uklinux.net>
|
||||||
|
|
||||||
* api-debug.texi (Traps): Minor edits.
|
* api-debug.texi (Traps): Minor edits.
|
||||||
|
|
|
@ -1560,16 +1560,16 @@ following subsubsection.
|
||||||
@subsubsection Location Traps
|
@subsubsection Location Traps
|
||||||
|
|
||||||
The @code{<location-trap>} class implements traps that are triggered
|
The @code{<location-trap>} class implements traps that are triggered
|
||||||
by evaluation of code at a specific source location or within a
|
by evaluation of code at a specific source location. When compared
|
||||||
specified range of source locations. When compared with source traps,
|
with source traps, they are easier to set, and do not become
|
||||||
they are easier to set, and do not become irrelevant when the relevant
|
irrelevant when the relevant code is reloaded; but unfortunately they
|
||||||
code is reloaded; but unfortunately they are considerably less
|
are a lot less efficient, as they require running some ``are we in the
|
||||||
efficient, as they require running some ``are we in the right place
|
right place for a trap'' code on every low level frame entry trap
|
||||||
for a trap'' code on every low level frame entry trap call.
|
call.
|
||||||
|
|
||||||
@deffn {Class} <location-trap>
|
@deffn {Class} <location-trap>
|
||||||
Class for traps triggered by evaluation of code at a specific source
|
Class for traps triggered by evaluation of code at a specific source
|
||||||
location or in a specified range of source locations.
|
location.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Trap Option} #:file-regexp regexp
|
@deffn {Trap Option} #:file-regexp regexp
|
||||||
|
@ -1577,31 +1577,27 @@ A regular expression specifying the filenames that will match this
|
||||||
trap. This option must be specified when creating a location trap.
|
trap. This option must be specified when creating a location trap.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Trap Option} #:line line-spec
|
@deffn {Trap Option} #:line line
|
||||||
If specified, @var{line-spec} describes either a single line, in which
|
The line number (0-based) of the source location at which the trap
|
||||||
case it is a single integer, or a range of lines, in which case it is
|
should be triggered. This option must be specified when creating a
|
||||||
a pair of the form @code{(@var{min-line} . @var{max-line})}. All line
|
location trap.
|
||||||
numbers are 0-based, and the range form is inclusive-inclusive. If
|
|
||||||
@code{#f} or not specified, the trap is not restricted by line number.
|
|
||||||
(Default value @code{#f}.)
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Trap Option} #:column column-spec
|
@deffn {Trap Option} #:column column
|
||||||
If specified, @var{column-spec} describes either a single column, in
|
The column number (0-based) of the source location at which the trap
|
||||||
which case it is a single integer, or a range of columns, in which
|
should be triggered. This option must be specified when creating a
|
||||||
case it is a pair of the form @code{(@var{min-column}
|
location trap.
|
||||||
. @var{max-column})}. All column numbers are 0-based, and the range
|
|
||||||
form is inclusive-inclusive. If @code{#f} or not specified, the trap
|
|
||||||
is not restricted by column number. (Default value @code{#f}.)
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
Example:
|
Here is an example, which matches the @code{(facti (- n 1) (* a n))}
|
||||||
|
expression in @file{ice-9/debugging/example-fns.scm}:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(install-trap (make <location-trap>
|
(install-trap (make <location-trap>
|
||||||
#:file-regexp "example-fns.scm"
|
#:file-regexp "example-fns.scm"
|
||||||
#:line '(11 . 13)
|
#:line 11
|
||||||
|
#:column 6
|
||||||
#:behaviour gds-debug-trap))
|
#:behaviour gds-debug-trap))
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
|
@ -1612,8 +1608,7 @@ Example:
|
||||||
If the code described in the preceding subsubsections for creating and
|
If the code described in the preceding subsubsections for creating and
|
||||||
manipulating traps seems a little long-winded, it is of course
|
manipulating traps seems a little long-winded, it is of course
|
||||||
possible to define more convenient shorthand forms for typical usage
|
possible to define more convenient shorthand forms for typical usage
|
||||||
patterns. For example, my own @file{.guile} file contains the
|
patterns. Here are some examples.
|
||||||
following definitions for setting breakpoints and for tracing.
|
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(define (break! proc)
|
(define (break! proc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue