From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Neil Jerram" Newsgroups: gmane.lisp.guile.devel Subject: Re: Evaluating (exit) in the debugger Date: Fri, 21 Nov 2008 00:09:18 +0000 Message-ID: <49dd78620811201609v272c7487i72840fdafe80588f@mail.gmail.com> References: <20081119165343.A29659@eskimo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227226181 23364 80.91.229.12 (21 Nov 2008 00:09:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2008 00:09:41 +0000 (UTC) Cc: guile-devel@gnu.org To: "Derek Peschel" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Nov 21 01:10:43 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L3Jba-0005qP-QE for guile-devel@m.gmane.org; Fri, 21 Nov 2008 01:10:40 +0100 Original-Received: from localhost ([127.0.0.1]:45576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3JaR-00037F-Lg for guile-devel@m.gmane.org; Thu, 20 Nov 2008 19:09:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3JaL-00037A-MW for guile-devel@gnu.org; Thu, 20 Nov 2008 19:09:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3JaK-00036y-A6 for guile-devel@gnu.org; Thu, 20 Nov 2008 19:09:20 -0500 Original-Received: from [199.232.76.173] (port=51746 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3JaK-00036v-4D for guile-devel@gnu.org; Thu, 20 Nov 2008 19:09:20 -0500 Original-Received: from po-out-1718.google.com ([72.14.252.159]:33520) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3JaJ-0007cK-PH for guile-devel@gnu.org; Thu, 20 Nov 2008 19:09:20 -0500 Original-Received: by po-out-1718.google.com with SMTP id y22so994237pof.1 for ; Thu, 20 Nov 2008 16:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=HQWZjoUh3LSj3ZFqgmHC8ILDfqYYbBxhNvXB1eS6t8I=; b=caE1J3VAMDoOSZ39cc59zw9ALf76fjtlkaGZC01JidHYHSISgy1miZd+nqOfQiRp7e 7KtNHvEynJv0c7x5QN6Y4Wl2o1hYaVEd35wUdwt2DOpw0sdHaE8tSgDgHzFeyJV9Jizt klAHzh8+peKvkh57FtzqGlI3Rti7doDdtQlv4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=UKZF6o/5TeaqFhLzd92jrF8URExFld8P5SuPyfz+jf80LVEgRaah50qa9Ncl5UTTeO TgNghTXVVDz8lO33aLEuFZWsg6bBvDFI1C3nV8uBoFkHPpjTaqvOXlAYfCjAPQXJNwoc LAcchAQPd7X8wTOdyPk68WAVQENO5HskcijxQ= Original-Received: by 10.141.164.13 with SMTP id r13mr12058rvo.152.1227226158809; Thu, 20 Nov 2008 16:09:18 -0800 (PST) Original-Received: by 10.140.199.14 with HTTP; Thu, 20 Nov 2008 16:09:18 -0800 (PST) In-Reply-To: <20081119165343.A29659@eskimo.com> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7877 Archived-At: 2008/11/20 Derek Peschel : > 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