[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Evaluating (exit) in the debugger

From: Neil Jerram
Subject: Re: Evaluating (exit) in the debugger
Date: Fri, 21 Nov 2008 00:09:18 +0000

2008/11/20 Derek Peschel <address@hidden>:
> 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.


> - 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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]