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:39:55 +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="35266"; 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:40:33 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 1pNcdT-0008ry-Qy for guile-user@m.gmane-mx.org; Thu, 02 Feb 2023 17:40:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNcdD-00035Y-8D; Thu, 02 Feb 2023 11:40:15 -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 1pNcd8-0002zB-EG for guile-user@gnu.org; Thu, 02 Feb 2023 11:40:11 -0500 Original-Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNcd5-0002xU-Vt for guile-user@gnu.org; Thu, 02 Feb 2023 11:40:09 -0500 Original-Received: by mail-yb1-xb2b.google.com with SMTP id m199so2927165ybm.4 for ; Thu, 02 Feb 2023 08:40:07 -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=N//in/PpA0MjWc/UaCPx+4P3JOmNtoalyPPO2+QOn5o=; b=cRO2XaOv/y4vZAT60IpnNxTlDOKinxQPJwGQnP+MesUiGNyfRp9e48CzyrHsbpp03M mr86TNQ360BlPPVzluKkLK9mgzi4G0YAKqoKyNAooldZuuZWxRGdEA8xbqHbUZJY6obz UuPIy0JqYqVI+jqUuraqKbkacOP7xU189xihVGLtnx88T1bKAGGjbBWxa3q4rGOz9vrM gY46j4U6qMSFg5p0xzPf+B1WZiW24bvT6QvwjI0uj0Oc+C87eKleB0MsN43y9iNkwWVf 2MwOKwf7AgevFaG8O2Zq3cSU7qIcIw5KGJLZPOX51LtOL4+hg4vLD60atjPablU88UoW 1J8g== 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=N//in/PpA0MjWc/UaCPx+4P3JOmNtoalyPPO2+QOn5o=; b=tqaXYJtRWAm3XWoKMBijFiqAS3MlF1Q9K4lSYPgrJqoXesJWN9+XggvuTkuLhdQu7i HR2dtXGFv5vZTt7eTNNqy4AM5mjtJrGevYyPDeY3GOzuAWUCHWdweK1e/FxjCJND7Af7 vjlZmyOmwqOExLeFErV2s6vjuCXm/9/IilRDZrgxVmAxo4uwqet+mvwE6WpYm32OKmNG M+PkHM5LvOAo6f2dTKHYaEPstKUPhLO/z2t9d0F+MzTIrv3JfbW+7rNpT1X0tJ0Zbnz0 1OT85nXpghVbu2BHP1zlCh6Sl5YkC/nnnD7y0VZV/RDZZgVpozvXSDAOZJqp1KI5iPLz pkjA== X-Gm-Message-State: AO0yUKWDH+csCDiJdleP2v8ai5yA4DwaspIa4X/lasXUvge/vXb/e/qr zpmr5huY5QTCwOcBVz+q4QqSslCTlxaelIlamdnyU9aRUiQ= X-Google-Smtp-Source: AK7set+8npcX4yPQBhNC9/YoT0YPO9JnbTIPAM+YZYy//UZ8DS2eJhF34Wn2Z4i6fjgLuibHWmcrhzwXkO/wUY3CIPA= X-Received: by 2002:a25:391:0:b0:856:771a:4449 with SMTP id 139-20020a250391000000b00856771a4449mr358653ybd.125.1675356006710; Thu, 02 Feb 2023 08:40:06 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b2b; envelope-from=fabriziobianchi51@gmail.com; helo=mail-yb1-xb2b.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:18881 Archived-At: Dal terminale ho eseguito il seguente comando apt-get install guile-3.0. bianchi fabrizio Il giorno gio 2 feb 2023 alle ore 17:35 Fabrizio Bianchi < fabriziobianchi51@gmail.com> ha scritto: > 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. >> >