From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrizio Bianchi Newsgroups: gmane.lisp.guile.user Subject: Re: How to get better stack trace from a script executed via shebang? Date: Thu, 2 Feb 2023 17:35:33 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13037"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Feb 02 17:36:15 2023 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pNcZK-00035o-2I for guile-user@m.gmane-mx.org; Thu, 02 Feb 2023 17:36:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNcYt-0001q9-Ui; Thu, 02 Feb 2023 11:35:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNcYt-0001q1-6k for guile-user@gnu.org; Thu, 02 Feb 2023 11:35:47 -0500 Original-Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNcYr-0001g7-Mm for guile-user@gnu.org; Thu, 02 Feb 2023 11:35:46 -0500 Original-Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-520dad0a7d2so33728577b3.5 for ; Thu, 02 Feb 2023 08:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=SnUr0nepihx/JUnGHMu1EISylPUz92d7McH9Q3JPLbk=; b=NIRQkrPOWLDWRjMLbyP7sCIrDwJ8U5XzP7j6iREnE/DXrqr1rVRQoHj0COA1lh3mIR YU2MKnoC5VnnbBIpRslkuUz5nosrVz/Noz9jSJIaK/ukNZU0PZ820cp590Zx8Wp7k46/ R8M6WXRQhCMC7HS343achUeamewNykBrNYc278LhtGNaU+7//mAogw1pcBcLxBu3/u2X q31AKIfjvixUdeQKZhkzJrJy7okvMyL0MfBT9fXSMv98G5qoZ1xxoj3O2sX+IZQKd0wE 70WrFwKc2puO4oNZhKXQoBFc2cy2wwpnDrj3Xx+FYaTD0SeIN4tgZUxrPlXvJUo0hojt ANwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SnUr0nepihx/JUnGHMu1EISylPUz92d7McH9Q3JPLbk=; b=unXtXfUIQreFMMb1MeCyM2Na223t/bZHWixNaddEo1LhsxsVrXlFmxtZruLFEUyOho LRSq2mIGmXHhLMALFBOlBvTkNqij4isJdqZqmqxc5TWVIteGy1GZRGWugc1q0dXjM9br N/DYd1xLNGq9eA2a9atSn88rqDc8wIGLH7/eJk49hNZvAOopUVbl2J6UM5haRBEwvrMP 2BPMC0J+ExvUEYdtj+/xO2G2tJb7EpEFzfsA87/Ft2w+cDEss6p//6TxtgeS/cVTvCRy 7o/8HuCEEFKIB8bKRmQl9J6/RPue42br4C9XgH0ZjXPzRqMcbfytKlOX/f8+mYrLtfez VMZA== X-Gm-Message-State: AO0yUKV4TBK3ziNLXP9Kzh/6nJc75DnST18wHMGvWjLTc8zZC0bPodwh BxLaZmMqmPvMbQOfSmn7AMbSqsmd0Dh9kHM8wRrM+VYY7MY= X-Google-Smtp-Source: AK7set+grbwRrSdzzTYlRRog0MbeqbeFyMbW6r3uWOxfhdSf+IWNSIeLq6lFOfC04sj2GrJXuW3EAXfiMhAr8bhYOIU= X-Received: by 2002:a81:6cb:0:b0:50f:57a2:9959 with SMTP id 194-20020a8106cb000000b0050f57a29959mr993567ywg.215.1675355743980; Thu, 02 Feb 2023 08:35:43 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1130; envelope-from=fabriziobianchi51@gmail.com; helo=mail-yw1-x1130.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:18879 Archived-At: salve. Ho letto il vostro messaggio. Purtroppo non capisco quale sia il problema. Provi a sentire la community. Ho installato dal sito FSF.org il guile 3.0.9 bianchi fabrizio Il giorno gio 2 feb 2023 alle ore 17:13 Wolf ha scritto: > Hello, > > I'm having a problem of getting borderline useless stack traces from a > script > executed via a shebang. For example, let's consider following script: > > $ cat /tmp/x.scm > #!/bin/sh > exec guile --no-auto-compile -e main -s "$0" "$@" > !# > > (define (main args) > (foo)) > > (define (foo) > (bar)) > > (define (bar) > (error "x")) > > When I execute it directly, the error message is not great: > > $ /tmp/x.scm > Backtrace: > In ice-9/boot-9.scm: > 1752:10 4 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type > _) > In unknown file: > 3 (apply-smob/0 #) > In ice-9/boot-9.scm: > 724:2 2 (call-with-prompt ("prompt") # ice-9/eval.scm:330:13 ()> #) > In ice-9/eval.scm: > 619:8 1 (_ #(#(#))) > In ice-9/boot-9.scm: > 2007:7 0 (error _ . _) > > ice-9/boot-9.scm:2007:7: In procedure error: > x > > The /tmp/x.scm file is not even mentioned once in the output. Can this be > somehow (command line arguments, changing the exec line, ...) improved? > Currently it's not very useful when I need to find out what the problem > was. > > Thank you, > W. > > -- > There are only two hard things in Computer Science: > cache invalidation, naming things and off-by-one errors. >