From: Derek Peschel <dpeschel@eskimo.com>
To: Neil Jerram <neiljerram@googlemail.com>
Cc: guile-devel@gnu.org
Subject: Re: Evaluating (exit) in the debugger
Date: Thu, 20 Nov 2008 16:48:32 -0800 [thread overview]
Message-ID: <20081120164832.A7356@eskimo.com> (raw)
In-Reply-To: <49dd78620811201609v272c7487i72840fdafe80588f@mail.gmail.com>; from neiljerram@googlemail.com on Fri, Nov 21, 2008 at 12:09:18AM +0000
On Fri, Nov 21, 2008 at 12:09:18AM +0000, Neil Jerram wrote:
> I'm afraid I don't understand. What do you want to happen when you
> type "e (exit)"?
I want Guile to exit, just as normally happens when you call (exit).
Also return codes should be supported in the debugger as in the REPL,
e.g. "e (exit 5)" should return 5 to the calling UNIX process.
The principle is that the debugger should not interfere with the
actions of code it's debugging, which to me includes "e"'d code.
> 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.
Obviously I'm abusing it then. :) Seriously, if you did evaluate a
complex expression, or were confused about environment lookup (since the
expression is evaluated in the context of the current stack frame as
chosen by the up/down/frame commands, right?) the backtrace would be
useful.
This gets into issues like recursive debugging, which is a feature I
confess I haven't used much yet, however nice it may be in theory.
> The lazy-catch handler can also set a variable (global or lexical), can't it?
It certainly should be able to. That might lead to a workable solution.
Suppressing error messages is another necessary part of the solution
(at least IMO).
> 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?
I will have to look at the code and my experiments later, when I've
finished the things I'm supposed to be doing. However I know for a fact
that at least one level of handler gets the "unhandled quit exception"
I described, with nothing related to continue that I've seen.
And I need to work out how many levels of handler are running when the
evaluation happens. I wonder if Guile can tell me that?
-- Derek
next prev parent reply other threads:[~2008-11-21 0:48 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
2008-11-21 0:48 ` Derek Peschel [this message]
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=20081120164832.A7356@eskimo.com \
--to=dpeschel@eskimo.com \
--cc=guile-devel@gnu.org \
--cc=neiljerram@googlemail.com \
/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).