From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.user Subject: Re: guile-debugging: how to access source properties from trap context Date: Mon, 02 Jan 2006 12:39:55 +0000 Message-ID: <87hd8mpzvo.fsf@ossau.uklinux.net> References: <20060101213351.GA5366@tosh> <87vex3pjni.fsf@ossau.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136211520 26701 80.91.229.2 (2 Jan 2006 14:18:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Jan 2006 14:18:40 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jan 02 15:18:31 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EtQVx-0003Us-64 for guile-user@m.gmane.org; Mon, 02 Jan 2006 15:18:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EtQXV-0007ak-V8 for guile-user@m.gmane.org; Mon, 02 Jan 2006 09:19:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EtPB3-000132-0p for guile-user@gnu.org; Mon, 02 Jan 2006 07:52:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EtP74-0007pn-8u for guile-user@gnu.org; Mon, 02 Jan 2006 07:48:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EtP2A-0006ON-NL for guile-user@gnu.org; Mon, 02 Jan 2006 07:43:31 -0500 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EtP3D-0002Fi-Fq for guile-user@gnu.org; Mon, 02 Jan 2006 07:44:35 -0500 Original-Received: from laruns (host86-129-132-201.range86-129.btcentralplus.com [86.129.132.201]) by mail3.uklinux.net (Postfix) with ESMTP id 6EF1E409FB3; Mon, 2 Jan 2006 12:41:51 +0000 (UTC) Original-Received: from laruns (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id A384C6F658; Mon, 2 Jan 2006 12:39:55 +0000 (GMT) Original-To: Holger Blasum In-Reply-To: <87vex3pjni.fsf@ossau.uklinux.net> (Neil Jerram's message of "Mon, 02 Jan 2006 00:18:09 +0000") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5023 Archived-At: Neil Jerram 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) #< 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