[Fwd: guile-debugger-0.1 available]

Bill Gribble grib@linuxdevel.com
15 Aug 2001 16:35:44 -0500


--=-rbqFF0q0AJ4HvUB8LZIQ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Thought this might be of interest to gnucash folks.  Also keep in mind
that our own Rob Browning has a pretty decent profiler in the
forthcoming guile-1.6 ...

b.g.


--=-rbqFF0q0AJ4HvUB8LZIQ
Content-Disposition: inline
Content-Description: Forwarded message - guile-debugger-0.1 available
Content-Type: message/rfc822

Return-Path: <guile-user-admin@gnu.org>
Delivered-To: grib@localhost.internal.billgribble.com
Received: from localhost (localhost [127.0.0.1]) by
	flophouse.internal.billgribble.com (Postfix) with ESMTP id 6E11D89EED for
	<grib@localhost>; Wed, 15 Aug 2001 16:23:41 -0500 (CDT)
Received: from pop3.jump.net [206.196.91.8] by localhost with IMAP
	(fetchmail-5.8.17) for grib@localhost (single-drop); Wed, 15 Aug 2001
	16:23:41 -0500 (CDT)
Received: (from grib@localhost) by mail22.jump.net (8.11.4/) id
	f7FLP3p09043; Wed, 15 Aug 2001 16:25:03 -0500 (CDT)
Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) by
	mail22.jump.net (8.11.4/) with ESMTP id f7FLP2609034; Wed, 15 Aug 2001
	16:25:02 -0500 (CDT)
Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) by
	mail22.jump.net (8.11.4/) with ESMTP id f7FLP2609034; Wed, 15 Aug 2001
	16:25:02 -0500 (CDT)
Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by
	fencepost.gnu.org with esmtp (Exim 3.22 #1 (Debian)) id 15X83E-0005fn-00;
	Wed, 15 Aug 2001 17:18:08 -0400
Received: from ns1.uklinux.net ([212.1.130.11] helo=s1.uklinux.net) by
	fencepost.gnu.org with esmtp (Exim 3.22 #1 (Debian)) id 15X81f-0005eh-00;
	Wed, 15 Aug 2001 17:16:31 -0400
Received: from portalet.ossau.uklinux.net
	(IDENT:root@ppp-3a-83.3com.telinco.net [212.159.132.83]) by s1.uklinux.net
	(8.11.2/8.11.1) with ESMTP id f7FLGPq05465; Wed, 15 Aug 2001 22:16:26 +0100
Received: from laruns.ossau.uklinux.net.ossau.uklinux.net
	(neil@laruns.ossau.uklinux.net [192.168.1.3]) by portalet.ossau.uklinux.net
	(8.9.3/8.8.7) with ESMTP id WAA01965; Wed, 15 Aug 2001 22:14:27 +0100
To: guile-user@gnu.org, guile-sources@gnu.org
Subject: guile-debugger-0.1 available
From: Neil Jerram <neil@ossau.uklinux.net>
Message-ID: <87zo91m3bs.fsf@laruns.ossau.uklinux.net>
Lines: 144
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Sender: guile-user-admin@gnu.org
Errors-To: guile-user-admin@gnu.org
X-BeenThere: guile-user@gnu.org
X-Mailman-Version: 2.0.5
Precedence: bulk
List-Help: <mailto:guile-user-request@gnu.org?subject=help>
List-Post: <mailto:guile-user@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/guile-user>,
	<mailto:guile-user-request@gnu.org?subject=subscribe>
List-Id: General Guile related discussions <guile-user.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/guile-user>,
	<mailto:guile-user-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/guile-user/>
Date: 15 Aug 2001 22:16:23 +0100
Content-Type: text/plain; charset=us-ascii

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
neil@ossau.uklinux.net.


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 `guile-user@gnu.org' carries discussions, questions,
and often answers, about Guile.  To subscribe, send mail to
guile-user-request@gnu.org.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user

--=-rbqFF0q0AJ4HvUB8LZIQ--