From: Joris van der Hoeven <TeXmacs@math.u-psud.fr>
Cc: Guile Development <guile-devel@gnu.org>
Subject: Re: PLEASE: debugging embedded guile code
Date: Sun, 27 Apr 2003 10:40:58 +0200 (CEST) [thread overview]
Message-ID: <Pine.GSO.4.33.0304271037280.1992-100000@sunanh> (raw)
In-Reply-To: <m3llxx6oph.fsf@laruns.ossau.uklinux.net>
> >>>>> "Joris" == Joris van der Hoeven <TeXmacs@math.u-psud.fr> 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
next prev parent reply other threads:[~2003-04-27 8:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.GSO.4.33.0304261706460.1619-100000@sunanh>
2003-04-26 15:34 ` PLEASE: debugging embedded guile code Neil Jerram
2003-04-26 15:40 ` Joris van der Hoeven
2003-04-26 19:30 ` Neil Jerram
2003-04-27 8:40 ` Joris van der Hoeven [this message]
[not found] <Pine.GSO.3.96.1030209200016.26546A-100000@anh>
2003-02-25 14:19 ` Joris van der Hoeven
2003-02-25 14:36 ` Dale P. Smith
2003-04-26 14:51 ` Neil Jerram
2003-04-26 16:40 ` Bruce Korb
2003-04-26 19:12 ` Neil Jerram
2003-04-26 20:13 ` Bruce Korb
2003-04-27 20:49 ` Neil Jerram
2003-04-27 21:57 ` Bruce Korb
2003-04-28 15:54 ` Paul Jarc
2003-04-28 16:07 ` Bruce Korb
2003-04-28 19:21 ` Neil Jerram
2003-04-28 20:06 ` Bruce Korb
2003-04-28 20:58 ` Neil Jerram
2003-05-16 17:19 ` Bruce Korb
2003-05-16 19:23 ` Neil Jerram
2003-05-16 20:27 ` Bruce Korb
2003-05-16 21:21 ` Rob Browning
2003-05-16 21:56 ` Bruce Korb
2003-05-17 0:31 ` Bruce Korb
2003-05-17 2:33 ` Bruce Korb
2003-05-19 15:00 ` Paul Jarc
2003-04-28 13:52 ` Mikael Djurfeldt
2003-04-28 19:26 ` Neil Jerram
2003-04-26 14:45 ` Neil Jerram
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=Pine.GSO.4.33.0304271037280.1992-100000@sunanh \
--to=texmacs@math.u-psud.fr \
--cc=guile-devel@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).