From: "Neil Jerram" <neiljerram@googlemail.com>
To: "Derek Peschel" <dpeschel@eskimo.com>
Cc: guile-devel@gnu.org
Subject: Re: Evaluating (exit) in the debugger
Date: Fri, 21 Nov 2008 00:09:18 +0000 [thread overview]
Message-ID: <49dd78620811201609v272c7487i72840fdafe80588f@mail.gmail.com> (raw)
In-Reply-To: <20081119165343.A29659@eskimo.com>
2008/11/20 Derek Peschel <dpeschel@eskimo.com>:
> Hi a second time.
>
> I'm using Guile 1.8.4, a copy of (ice-9 debugging) from guile 1.8.5, and
> guile-debugging 0.15. It seems natural to type "e (exit)" at the debug>
> prompt. Unfortunately the quit exception isn't acted on. Is there any
> reasonable way to change the debugger? Note the following:
I'm afraid I don't understand. What do you want to happen when you
type "e (exit)"?
> - The debugger must catch all exceptions created by evaluated code,
> not just a list of certain kinds, so it can isolate itself from the
> effects of the code.
OK.
> - The debugger must use lazy-catch so it can save and show the details
> of the error.
Agree that it does at the moment, but I'm not sure this is strictly
needed. The debugger "e" command is mostly intended for variable
values and simple expressions - so normally there could not be a
backtrace of much interest.
> - With regular catch, you can do:
>
> (catch #t
> ;; thunk which returns #f
>
> ;; handler which checks the exception type
> ;; if 'quit, set status (known to the caller of the catch)
> ;; and return #t
> ;; otherwise, do the right nonlocal thing
> )
>
> and the caller of the catch can look at the Boolean and status. The code
> in (ice-9 boot-9) does exactly this. But that won't work with lazy-catch;
> if the handler returns the exception is rethrown.
The lazy-catch handler can also set a variable (global or lexical), can't it?
> - I'm not aware of any syntax for catching all exceptions excluding a
> list of types. If that syntax existed, I could avoid invoking the lazy-
> catch handler.
You're correct that this doesn't exist.
Just had a quick look at eval-handler in (ice-9 debugger commands)...
did you notice that it ends with (throw 'continue) - and hence that
the default lazy-catch rethrowing isn't actually happening? Is it
possible that (throw 'continue) is the cause of the problem?
Regards,
Neil
next prev parent reply other threads:[~2008-11-21 0:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 0:53 Evaluating (exit) in the debugger Derek Peschel
2008-11-21 0:09 ` Neil Jerram [this message]
2008-11-21 0:48 ` Derek Peschel
2008-11-21 9:58 ` Derek Peschel
2008-11-21 21:14 ` Derek Peschel
2008-11-23 22:24 ` 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=49dd78620811201609v272c7487i72840fdafe80588f@mail.gmail.com \
--to=neiljerram@googlemail.com \
--cc=dpeschel@eskimo.com \
--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).