unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
Cc: guile-user@gnu.org
Subject: Re: guile-debugging: how to access source properties from trap context
Date: Mon, 02 Jan 2006 12:39:55 +0000	[thread overview]
Message-ID: <87hd8mpzvo.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87vex3pjni.fsf@ossau.uklinux.net> (Neil Jerram's message of "Mon, 02 Jan 2006 00:18:09 +0000")

Neil Jerram <neil@ossau.uklinux.net> writes:

> It sounds like what you might in fact want is a report of the
> evaluation of each subexpression within mkmatrix.  In that case, the
> correct incantation would be something like this:

[complex incantations suppressed]

It occurred to me later that I should also point out a much simpler
option.  If you are just looking for something analogous to the GDB
example that you gave, you can get this much more easily as the
following session trace shows.

neil@laruns:~$ /usr/bin/guile -q
guile> (use-modules (ice-9 debugger) (ossau ice-9-debugger-extensions) (ossau breakpoints))
guile> (load "matrix.scm")
guile> (break-in 'mkmatrix #:behaviour debug-trap)
#<<break-in> 808cb70>
guile> (do-main 4)
This is the Guile debugger -- for help, type `help'.
There are 3 frames on the stack.

Frame 2:    [mkmatrix]
debug> next
Frame 3:    (let ((x 1)) (quote this-is-a-matric))
debug> info frame
Stack frame: 3
This frame is an evaluation.
The expression being evaluated is:
matrix.scm:3:3:
  (let ((x 1)) (quote this-is-a-matric))
debug> next
Frame 3:    (quote this-is-a-matric)
debug> bt
In unknown file:
   ?: 0* [primitive-eval (do-main 4)]
In standard input:
   5: 1* [do-main 4]
In matrix.scm:
   7: 2  [mkmatrix]
   ...
   4: 3  (quote this-is-a-matric)
debug> 

Or you can use the Emacs interface (GDS), by using (ossau gds-client)
instead of (ice-9 debugger) and (ossau ice-9-debugger-extensions), and
changing debug-trap to gds-debug-trap.

Hope this helps,

     Neil





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


  reply	other threads:[~2006-01-02 12:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-01 21:33 guile-debugging: how to access source properties from trap context Holger Blasum
2006-01-02  0:18 ` Neil Jerram
2006-01-02 12:39   ` Neil Jerram [this message]
2006-01-02 22:33     ` Holger Blasum
2006-01-03 22:57       ` Neil Jerram
2006-01-07 16:54         ` Holger Blasum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hd8mpzvo.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).