From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jose A. Ortega Ruiz" Newsgroups: gmane.lisp.guile.devel Subject: a couple bugs related to error reporting and backtraces Date: Mon, 15 Jun 2009 22:18:32 +0200 Message-ID: <87ocspb693.fsf@mithrandir.homeunix.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1245100115 26075 80.91.229.12 (15 Jun 2009 21:08:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jun 2009 21:08:35 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jun 15 23:08:31 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 1MGJPq-0003TI-Lr for guile-devel@m.gmane.org; Mon, 15 Jun 2009 23:08:30 +0200 Original-Received: from localhost ([127.0.0.1]:32900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGJPq-0001Xx-0y for guile-devel@m.gmane.org; Mon, 15 Jun 2009 17:08:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGJPm-0001Vc-Oq for guile-devel@gnu.org; Mon, 15 Jun 2009 17:08:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGJPh-0001TL-EV for guile-devel@gnu.org; Mon, 15 Jun 2009 17:08:25 -0400 Original-Received: from [199.232.76.173] (port=36293 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGJPh-0001TF-BV for guile-devel@gnu.org; Mon, 15 Jun 2009 17:08:21 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:32829 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MGJPg-0005WK-Ul for guile-devel@gnu.org; Mon, 15 Jun 2009 17:08:21 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MGJPc-0004Ev-SV for guile-devel@gnu.org; Mon, 15 Jun 2009 21:08:16 +0000 Original-Received: from 249.red-88-18-102.staticip.rima-tde.net ([88.18.102.249]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jun 2009 21:08:16 +0000 Original-Received: from jao by 249.red-88-18-102.staticip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Jun 2009 21:08:16 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 68 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 249.red-88-18-102.staticip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) X-Attribution: jao X-URL: Cancel-Lock: sha1:G79Xk3za/O4gqlfH0R9iauumJ4A= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:8687 Archived-At: Hi, I've got this trivial module definition in file a.scm: (define-module (a) #:export (ap)) (define (ap) (not-bound)) (ap) intended to cause an error upon calling `ap'. First bug is when trying to `load-compiled' a non-go file: scheme@(guile-user)> (load-compiled "./a.scm") Backtrace: In unknown file: ?: 0* [# #:0:0 ()>] 1: 1* [#:0:0 ()>] ?: 2* [load-compiled/vm "./a.scm"] ERROR: In procedure make_objcode_by_mmap: ERROR: Success scheme@(guile-user)> As you can see, the error key, Success, is not correct. This happens with any non-go file (so the contents above is not relevant). So let's compile and load the real file: scheme@(guile-user)> ,i (system base compile) scheme@(guile-user)> (load-compiled (compile-file "/home/jao/tmp/a.scm")) Backtrace: In unknown file: ?: 0* [# #:1:0 ()>] 2: 1* [#:1:0 ()>] ?: 2* [load-compiled/vm "/home/jao/.guile-ccache/1.9//home/jao/tmp/a.scm.go"] ?: 3* [ap] ERROR: In procedure module-lookup: ERROR: unbound variable: not-bound scheme@(a)> As you can see, the location of the error is not reported; with the same behaviour when calling the program interactively: scheme@(a)> ap # scheme@(a)> (ap) Backtrace: In unknown file: ?: 0* [# #:3:0 ()>] ?: 1* [ap] ERROR: In procedure module-lookup: ERROR: unbound variable: not-bound scheme@(a)> Adding the directory containing a.scm to Guile's load path changes nothing. What i was expecting is a backtrace pointing me to the location of the call to `not-bound' in a.scm. Am i doing something wrong? Thanks! jao