From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: PLEASE: debugging embedded guile code Date: 26 Apr 2003 20:30:50 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1051385541 23564 80.91.224.249 (26 Apr 2003 19:32:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 26 Apr 2003 19:32:21 +0000 (UTC) Cc: Guile Development Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Apr 26 21:32:19 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 199VPH-00067u-00 for ; Sat, 26 Apr 2003 21:32:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 199VPA-000861-07 for guile-devel@m.gmane.org; Sat, 26 Apr 2003 15:32:12 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 199VOY-0007YM-00 for guile-devel@gnu.org; Sat, 26 Apr 2003 15:31:34 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 199VOT-0007Oh-00 for guile-devel@gnu.org; Sat, 26 Apr 2003 15:31:31 -0400 Original-Received: from mail.uklinux.net ([80.84.72.21] helo=s1.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 199VNy-0006hG-00 for guile-devel@gnu.org; Sat, 26 Apr 2003 15:30:58 -0400 Original-Received: from laruns.ossau.uklinux.net (bts-0107.dialup.zetnet.co.uk [194.247.48.107]) by s1.uklinux.net (8.11.6p2/8.11.6) with ESMTP id h3QJUr114383; Sat, 26 Apr 2003 20:30:53 +0100 Original-Received: from laruns.ossau.uklinux.net.ossau.uklinux.net (localhost [127.0.0.1])ESMTP id E7BC5DC4D4; Sat, 26 Apr 2003 20:30:50 +0100 (BST) Original-To: Joris van der Hoeven In-Reply-To: Original-Lines: 50 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Original-cc: "Dale P. Smith" Original-cc: contact@texmacs.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2219 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2219 >>>>> "Joris" == Joris van der Hoeven writes: Joris> On 26 Apr 2003, Neil Jerram wrote: >> >> I agree, but I also think that the lazy-catch mechanism is more tricky >> than it needs to be, especially in C. So I'd like to get the >> mechanism right first and then document it. Joris> We now started to use lazy-catch more and more, but we might Joris> still change that. Can you tell us what you have in mind? Don't panic; I have nothing in mind yet. Judging from the apparent difficulty that people have with this area on the mailing list, I thought this was an issue that we should think about. If it really isn't an issue, no problem (except that we should improve the docs). lazy-catch in Scheme is straightforward, but my intuition is that doing a lazy-catch in C is harder work than should be needed to obtain error information. My problem is that I don't understand why you'd ever do it in C instead of Scheme, yet there have been several posts describing how to do exactly that. Hence my question about why one needs to do this in C (which I don't think anyone has answered yet). Joris> I also think that there you might add some scheme routines Joris> to construct comprehensive error messages from error Joris> objects. This would allow me to print these messages in a Joris> popup window or include them in a status buffer. I Joris> currently print everything to standard output or error... >> >> I think I understand, but can you give an example? Joris> You might for instance provide routines Joris> (error->message error-obj) Joris> (error->backtrace error-obj) Joris> (error->source error-obj) Joris> (error->file-name error-obj) Joris> (error->line-number error-obj) Joris> etc. Right. With the current organization of things, the location of an error is described by a stack obejct, so I think all of these but the first would be stack->X rather than error->X, but I see what you mean. These raise another C vs. Scheme question, though. These routines are trivial to implement in Scheme, but wouldn't then be readily available on the C level. Does that matter? and if so, why? Regards, Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel