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: Hook for script debugging Date: Sun, 27 Sep 2009 17:41:42 +0100 Message-ID: <87vdj48hmh.fsf@ossau.uklinux.net> References: <87k4zlhi85.fsf@ossau.uklinux.net> <87hbuppg9d.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1254069777 23792 80.91.229.12 (27 Sep 2009 16:42:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Sep 2009 16:42:57 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Sep 27 18:42:50 2009 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 1Mrwpm-0004U6-IF for guile-devel@m.gmane.org; Sun, 27 Sep 2009 18:42:50 +0200 Original-Received: from localhost ([127.0.0.1]:47343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mrwpm-0000Lg-3h for guile-devel@m.gmane.org; Sun, 27 Sep 2009 12:42:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mrwpk-0000Lb-1I for guile-devel@gnu.org; Sun, 27 Sep 2009 12:42:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mrwpf-0000LP-0u for guile-devel@gnu.org; Sun, 27 Sep 2009 12:42:47 -0400 Original-Received: from [199.232.76.173] (port=39044 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mrwpe-0000LL-NA for guile-devel@gnu.org; Sun, 27 Sep 2009 12:42:42 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:46180) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mrwpa-0000TI-Bt; Sun, 27 Sep 2009 12:42:38 -0400 Original-Received: from arudy (host86-147-112-99.range86-147.btcentralplus.com [86.147.112.99]) by mail3.uklinux.net (Postfix) with ESMTP id 032481F67FC; Sun, 27 Sep 2009 17:41:59 +0100 (BST) Original-Received: from arudy (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 7D0DC38023; Sun, 27 Sep 2009 17:41:43 +0100 (BST) In-Reply-To: <87hbuppg9d.fsf@gnu.org> ("Ludovic =?iso-8859-1?Q?Court=E8s?= =?iso-8859-1?Q?=22's?= message of "Sat, 26 Sep 2009 23:06:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:9411 Archived-At: ludo@gnu.org (Ludovic Court=A8=A8s) writes: > Hi Neil, > > Do you think a special mechanism is needed at all? Isn=A1=AFt it as easy= to > edit the script to be debugged than to remember the right environment > variable name, the right incantation, etc.? I think it's inelegant to have to edit a script in order to debug it. If there is some generally useful system for debugging/introspection of a running Guile program - such as GDS, as I hope it will eventually become - it seems more efficient to be able to have a global switch for invoking that system - e.g. adding GUILE_BOOT_FORM to the environment - than to have to temporarily add the same invocation code to each program that you want to examine (and then remove it again when no longer needed). Also I think there can be situations where it's inconvenient or impossible to edit the code, and I'd like to support those too. For example a non-root user wanting to debug an installed program. It might be possible for that user to copy parts of the installed tree, and set various paths to pick up the writable copies instead of the read-only installed code. But that seems difficult. And, the more one has to modify or copy parts of any existing program, the less sure one can be that it will still run the same as it does normally. On the technical front - in case it makes a difference to your view on this - I've discovered that it doesn't work to do this by adding code to the end of boot-9.scm, because (command-line) hasn't been set up at that point. If we provide this feature, it will need to be in C code in scm_compile_shell_switches instead. > (In my case I know I would most likely end up editing the script rather > than going some other way, unless that other way is significantly more > convenient.) Well I would hope to make this new way convenient... But whatever happens, the script editing approach will be possible too, of course. Regards, Neil