From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Derek Peschel Newsgroups: gmane.lisp.guile.devel Subject: Re: Evaluating (exit) in the debugger Date: Fri, 21 Nov 2008 01:58:52 -0800 Message-ID: <20081121015851.A14566@eskimo.com> References: <20081119165343.A29659@eskimo.com> <49dd78620811201609v272c7487i72840fdafe80588f@mail.gmail.com> <20081120164832.A7356@eskimo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227261619 6348 80.91.229.12 (21 Nov 2008 10:00:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2008 10:00:19 +0000 (UTC) Cc: guile-devel@gnu.org To: Neil Jerram Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Nov 21 11:01:21 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 1L3SpD-0007am-Fr for guile-devel@m.gmane.org; Fri, 21 Nov 2008 11:01:19 +0100 Original-Received: from localhost ([127.0.0.1]:60103 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3So4-0004nu-KS for guile-devel@m.gmane.org; Fri, 21 Nov 2008 05:00:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3Sms-0004Fd-Va for guile-devel@gnu.org; Fri, 21 Nov 2008 04:58:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3Smr-0004Es-Va for guile-devel@gnu.org; Fri, 21 Nov 2008 04:58:54 -0500 Original-Received: from [199.232.76.173] (port=49466 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3Smr-0004En-Lr for guile-devel@gnu.org; Fri, 21 Nov 2008 04:58:53 -0500 Original-Received: from ultra5.eskimo.com ([204.122.16.68]:60829) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3Sms-0001Or-79 for guile-devel@gnu.org; Fri, 21 Nov 2008 04:58:54 -0500 Original-Received: from eskimo.com (eskimo.com [204.122.16.13]) by ultra5.eskimo.com (8.14.3/8.14.0) with ESMTP id mAL9woSj019402; Fri, 21 Nov 2008 01:58:51 -0800 Original-Received: (from dpeschel@localhost) by eskimo.com (8.9.1a/8.9.1) id BAA15789; Fri, 21 Nov 2008 01:58:52 -0800 (PST) Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20081120164832.A7356@eskimo.com>; from dpeschel@eskimo.com on Thu, Nov 20, 2008 at 04:48:32PM -0800 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:7880 Archived-At: On Thu, Nov 20, 2008 at 04:48:32PM -0800, Derek Peschel wrote: > On Fri, Nov 21, 2008 at 12:09:18AM +0000, Neil Jerram wrote: > > 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? > 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. You're right, eval-handler does throw 'continue as it exits. I hadn't taken that complication into account, or defined the problem totally clearly. Well, I did already know that the problem is not the rethrow behavior per se. The problem is how to invisibly get the quit exception to a handler that can deal with it by quitting, while allowing the debugger to catch every other exception that can possibly be thrown by the debuggee and ideally to give a backtrace. Before eval-handler throws 'continue, it uses key and args to print the backtrace. I did two tests to demonstrate the backtrace-printing part of eval-handler. In test 1, I put in (display)s of key and args. That's how I know eval-handler gets an "unhandled quit exception" exception. In test 2, I also added a (lazy-catch 'quit) inside the (lazy-catch #t) in (evaluate), really just to see what would happen. And that inner handler gets a regular quit exception. Then it rethrows it, because I couldn't think of anything better to do. And eval-handler gets the same exception as in test 1. I can send patches or terminal transcripts for both tests. Clearly I'll next have to see what eval-handler can do besides throwing 'continue. But even before that throw happens, things are uglier than I wanted because eval-handler doesn't get a quit exception. My solution of special-casing the "unhandled quit exception" exception might work, it's just not elegant. I also have to figure out why eval-handler is not getting an ordinary quit exception in test 1. -- Derek