guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile-debugger-0.1 available


From: Neil Jerram
Subject: guile-debugger-0.1 available
Date: 15 Aug 2001 22:16:23 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Please find guile-debugger-0.1 available at

        http://www.ossau.uklinux.net/guile/guile-debugger-0.1.tar.gz

guile-debugger is a Guile debugger.  It acts as an enhanced drop-in
replacement for the (ice-9 debug) and (ice-9 debugger) modules that
come with core Guile.

Please send suggestions, contributions and bug reports to
address@hidden


This Release =========================================================

It's a pretty raw release (firmly in accordance with the `release
early, release often' principle :-).

So, on the one hand, be careful with it; but on the other hand, I'm
very interested to hear if you find it useful, and any suggestions you
have for where I should focus effort next.


Features =============================================================

guile-debugger's current features are very similar to those provided
by the (ice-9 debug) and (ice-9 debugger) modules in the core Guile
distribution.  The three user-level enhancements are

- application-based breakpoints - i.e. the ability to say `break and
  enter the debugger immediately before any application of so-and-so
  procedure'

- debug-on-error - i.e. the ability to automatically enter the
  debugger when an error occurs

- integration of breakpoints (and other future debugger features) with
  tracing, so that they can be used together.

>From an internal point of view, the other big difference from (ice-9
debugger) is that I've replaced its dedicated command loop code with
some (previously written) generic command loop code of my own.


Prerequisites ========================================================

You need Guile version 1.5.1 (to be released shortly) or later, or a
CVS Guile of July 2001 or later (either stable or unstable).  If you
don't already have this, see under "Obtaining guile-debugger and
Guile".


Sample Session =======================================================

As a substitute for real documentation, here's a transcript of a
sample debugging session.

guile> (use-modules (ossau debugger) (ossau fns))
guile> (debugh)
This is the Guile debugger; type `help' for help.
There is 1 frame on the stack.

Frame 0:    [primitive-eval (debugh)]
debug> trace-apply facti
debug> quit
guile> (fact2 5)
[facti 5 1]
[facti 4 5]
[facti 3 20]
[facti 2 60]
[facti 1 120]
[facti 0 120]
120
($ 2) => 120
guile> (debugh)
This is the Guile debugger; type `help' for help.
There is 1 frame on the stack.

Frame 0:    [primitive-eval (debugh)]
debug> break-apply facti
debug> quit
guile> (fact2 5)
BREAK: about to apply #<procedure facti (n a)> to args (5 1) [non-tail call]
[facti 5 1]
Frame 2:    [facti 5 1]
debug> info-args
Stack frame: 2
This frame has 2 arguments:
  5
  1
debug> quit
BREAK: about to apply #<procedure facti (n a)> to args (4 5) [tail call]
[facti 4 5]
Frame 3:    [facti 4 5]
debug> quit
BREAK: about to apply #<procedure facti (n a)> to args (3 20) [tail call]
[facti 3 20]
Frame 3:    [facti 3 20]
debug> unbreak-apply facti
debug> quit
[facti 2 60]
[facti 1 120]
[facti 0 120]
120
($ 3) => 120
guile> (debugh)
This is the Guile debugger; type `help' for help.
There is 1 frame on the stack.

Frame 0:    [primitive-eval (debugh)]
debug> debug-on-error #t
debug> quit
guile> (let ((a "hello") (b 34)) (string-append a b))
This is the Guile debugger; type `help' for help.
There are 3 frames on the stack.

Frame 2:    [string-append "hello" 34]
debug> backtrace
In unknown file:
   ?: 0* [primitive-eval (let ((a "hello") (b 34)) (string-append a b))]
   6: 1* (let ((a "hello") (b 34)) (string-append a b))
   6: 2  [string-append "hello" 34]
debug> info-frame
Stack frame: 2
This frame is an application.
The corresponding expression is:
  (string-append a b)
The procedure being applied is: string-append
The procedure's arguments are: ("hello" 34)
debug> quit
ERROR: In procedure string-append:
ERROR: Wrong type argument (expecting STRINGP): 34
ABORT: (wrong-type-arg)
guile>


Obtaining Guile ======================================================

If you don't already have Guile 1.6.0 or later, you also need to
download and install this by following the instructions at
http://www.gnu.org/software/guile.

The mailing list address@hidden' carries discussions, questions,
and often answers, about Guile.  To subscribe, send mail to
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]