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: Sun, 23 Nov 2008 22:24:09 +0000 Message-ID: <49dd78620811231424s4d837dd7s1fb4d5e62daf626@mail.gmail.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=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227479095 18632 80.91.229.12 (23 Nov 2008 22:24:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Nov 2008 22:24:55 +0000 (UTC) Cc: guile-devel@gnu.org To: "Derek Peschel" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Nov 23 23:25:59 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 1L4NOu-0007fw-M9 for guile-devel@m.gmane.org; Sun, 23 Nov 2008 23:25:56 +0100 Original-Received: from localhost ([127.0.0.1]:58493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4NNk-0002PK-WB for guile-devel@m.gmane.org; Sun, 23 Nov 2008 17:24:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4NNF-0002CZ-JM for guile-devel@gnu.org; Sun, 23 Nov 2008 17:24:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4NNE-0002B1-0O for guile-devel@gnu.org; Sun, 23 Nov 2008 17:24:13 -0500 Original-Received: from [199.232.76.173] (port=35366 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4NND-0002Ag-Lx for guile-devel@gnu.org; Sun, 23 Nov 2008 17:24:11 -0500 Original-Received: from rv-out-0708.google.com ([209.85.198.250]:8493) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L4NND-0005kz-68 for guile-devel@gnu.org; Sun, 23 Nov 2008 17:24:11 -0500 Original-Received: by rv-out-0708.google.com with SMTP id k29so1954408rvb.6 for ; Sun, 23 Nov 2008 14:24:09 -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=IAr3P2KCOVpi1wrfKm5ZLyaa8oLutkdz+QVDIq5iLJw=; b=SDv3MZl0Ec7DqNh8rC1cQCj8bGBBFjKhPQlxlnVb10zTugKYP0MT2YHSd/s9qaXTG+ ZF2n/f6HQF/oq7QMPdmSU+eVzZNjShiw7Gd52nGfAD8XKLq5d3aLkMB9UB+y48yX1Nbu H3Xvtw8idcgL5A3nYQGTrL9e8mW+VVp4iZy4E= 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=L9ckJnE92pBRQ2yMm0NfXWFz5yBTIQxWyOhIMwY8T9OHB5n2DSNZSZHNOS9LCfXWAK uQHYfBMNB4MdHqrpqxMsjshAfUmsg2++CHaGLrJhIOccY0EimMQ/dY1eOn1SxbrK0uRw I/tblTx0MaTceg2npew1cQRKfycTgk1MsfDTo= Original-Received: by 10.140.166.16 with SMTP id o16mr1517609rve.25.1227479049495; Sun, 23 Nov 2008 14:24:09 -0800 (PST) Original-Received: by 10.140.199.14 with HTTP; Sun, 23 Nov 2008 14:24:09 -0800 (PST) In-Reply-To: <20081120164832.A7356@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:7885 Archived-At: Hi Derek, I'm sorry that my followups to you are so slow, and hope that this hasn't resulted in unnecessary work... 2008/11/21 Derek Peschel : > 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. (primitive-exit RETURN-CODE) will do both of those. I'm afraid I can't remember why (exit ...) in Guile is actually just (throw 'quit ...), but it's been that way for a long time now, so might be difficult to change. > The principle is that the debugger should not interfere with the > actions of code it's debugging, which to me includes "e"'d code. Interesting. But on the other hand, we don't want unintended errors in "e"'d code to propagate back into the actual program! Is there any nice general way of distinguishing between intentional exceptions (which should not be caught by eval-handler) and unintended ones (which should be)? > 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? It's possible in principle, but I don't believe we currently have a primitive to expose this (i.e. the value of scm_i_dynwinds ()) to the Scheme level. If we did expose this, I think we should do so in a way that still allows us to change the internal representation of the wind list, without any back-compatibility problems. Regards, Neil