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:46:07 +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="26118"; 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:47:08 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 1pNcjs-0006cf-0u for guile-user@m.gmane-mx.org; Thu, 02 Feb 2023 17:47:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNcjG-0006dR-QE; Thu, 02 Feb 2023 11:46:30 -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 1pNcj7-0006cV-J4 for guile-user@gnu.org; Thu, 02 Feb 2023 11:46:24 -0500 Original-Received: from mail-yb1-xb34.google.com ([2607:f8b0:4864:20::b34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNcj5-0004CJ-Um for guile-user@gnu.org; Thu, 02 Feb 2023 11:46:21 -0500 Original-Received: by mail-yb1-xb34.google.com with SMTP id t16so2958141ybk.2 for ; Thu, 02 Feb 2023 08:46:19 -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=DlPIF5poRQxjedPRgTNODE4wyMplUG8zMjO7/cBelKU=; b=Z4On15625x9sQ3F9qiOgXLTwrHyxrt4ip0587WwbKgRF4p0pviaklegRha9yEf8nRy ejSBRLvL931IjAQmRVI8ftZajOwy31URUa1Ap6UPGyh4/GuRy1dgCF5QTnLqmYjuBHfB 0H3DVBBnQBro3cSUwddT8eichjbiBIP91Qd/4MnjTWVn6GnIFw8BwkWhG1ybijIJqDOr 6Qapn8e/2gckHGDeiZ1VjZo+cPbdE3JWM+vuPQbj7WeC31O4of1ZEuODXb19sDaSR6sy SDGPgZEyySvaPM3+BzyZCyNyhj8N/Wt7fNlS6fw1oItLQvWekHEKjKc3AZpPRCEqfkgA VHkw== 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=DlPIF5poRQxjedPRgTNODE4wyMplUG8zMjO7/cBelKU=; b=bPiM9lbPM1IBf/Bpd6OuR9fEidskWoK+wKWvOtXMYHTtxSzlbDadD8p9Nl3Mg0BfvQ T/sCxS9nRjzNbu8t/SSjcUXG7xaG3rUps4zKgZ3889zwPrpNf6SmvY9RYDzKdg0/X7NU pC/+R2y9zg4hyox5eQGcXZmTBTun2P2WGbnikpWHiPqAKOBCTp9t0y7WNc1uHkVh2fkf S3fjVjnsHMDJtK9ej9VnB+NEoBewM8CnQMIWuJsxet12rdYTnoziipXXIKTg/oBAgBIo qOKObOagedbNb3nzUXHHtu2DEOofJpe0FUO8ibhYFQ6sQbtezRoX4MVfIKOJZJtuN8nZ m1qA== X-Gm-Message-State: AO0yUKVy+LrSNCym6jQsO5SLYt+o8yKHiKxjLyrJPVk+qFZ2Sjk28C/i EbxL6mdk8VutDx9/YD4eTXMuRcx1KQFIsZ53qvJGuL3W8jU= X-Google-Smtp-Source: AK7set8QrGVYRi37cqf/BYJd2CEhYlDiMZuE40clzdDNWKpH4Q3/511VUv/6JwFMkIVVFSLiq14MZvHez8sta4Hh2es= X-Received: by 2002:a25:dac6:0:b0:702:5c2c:d722 with SMTP id n189-20020a25dac6000000b007025c2cd722mr985889ybf.252.1675356378657; Thu, 02 Feb 2023 08:46:18 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b34; envelope-from=fabriziobianchi51@gmail.com; helo=mail-yb1-xb34.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:18882 Archived-At: $ sudo 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. >> >