From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joris van der Hoeven Newsgroups: gmane.lisp.guile.devel Subject: Re: PLEASE: debugging embedded guile code Date: Sun, 27 Apr 2003 10:40:58 +0200 (CEST) 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 1051432946 24304 80.91.224.249 (27 Apr 2003 08:42:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 27 Apr 2003 08:42:26 +0000 (UTC) Cc: Guile Development Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Apr 27 10:42:23 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 199hjr-0006Jo-00 for ; Sun, 27 Apr 2003 10:42:23 +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 199hkV-0000vs-05 for guile-devel@m.gmane.org; Sun, 27 Apr 2003 04:43:03 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 199hk9-0000r8-00 for guile-devel@gnu.org; Sun, 27 Apr 2003 04:42:41 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 199hjB-0008UN-00 for guile-devel@gnu.org; Sun, 27 Apr 2003 04:41:41 -0400 Original-Received: from mathups.math.u-psud.fr ([129.175.52.4] helo=matups.math.u-psud.fr) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 199hic-0008GR-00 for guile-devel@gnu.org; Sun, 27 Apr 2003 04:41:06 -0400 Original-Received: from anh.math.u-psud.fr (sunanh.math.u-psud.fr [129.175.50.1]) h3R8ex8W026033 ; Sun, 27 Apr 2003 10:40:59 +0200 (MEST) Original-Received: by anh.math.u-psud.fr (Postfix, from userid 8116) id 0FC98C00F; Sun, 27 Apr 2003 10:40:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by anh.math.u-psud.fr (Postfix) with ESMTP id 0772358D6; Sun, 27 Apr 2003 10:40:59 +0200 (CEST) X-X-Sender: Original-To: Neil Jerram In-Reply-To: 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:2221 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2221 > >>>>> "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). I personally do not really need to make the distinction between Scheme-level and C-level (C++-level for me) anymore, because I added a C++ class 'object' which allows me to directly manipulate scheme objects at C++-level. In particular, if you implement the routines error->... below at Scheme-level, then we may take advantage of them at C++-level too. > 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? _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel