unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Klaus Schilling <schilling.klaus@web.de>
To: spk121@yahoo.com
Cc: guile-user@gnu.org
Subject: Re: Backtraces in Guile 2.0
Date: Tue, 22 Feb 2011 08:44:39 +0100 (CET)	[thread overview]
Message-ID: <20110222.084439.08404263.schilling.klaus@web.de> (raw)
In-Reply-To: <467344.39605.qm@web37901.mail.mud.yahoo.com>

From: Mike Gran <spk121@yahoo.com>
Subject: Backtraces in Guile 2.0
Date: Mon, 21 Feb 2011 19:23:03 -0800 (PST)

> Hi-
> 
> I have a few questions about how backtraces are supposed to work.
> 
> But let me start at the beginning, I guess.
> 
> If I create a file named "symbol1.scm" that contains the
> single erroneous line.
> 
> 
>   (symbol->string "STRING")
> 
> If I run that script, it creates a backtrace for the error but
> says it happens in "unknown file".  It seems to me that the file
> is easily knowable.  Is that the expected behavior?
> 
> 
> The autocompiled backtrace has 
> 
> 
>    In module/ice-9/boot-9.scm:
>    1917: 3 [save-module-excursion #<procedure 14f3180 at module/ice-9/boot-9.scm:3341:3 ()>]
>    3348: 2 [#<procedure 14f3180 at module/ice-9/boot-9.scm:3341:3 ()>]
>    In unknown file:
>       ?: 1 [load-compiled/vm "/home/mike/.cache/guile/ccache/2.0-LE-8-2.0/home/mike/Documents/code/guile_backtrace/symbol1.scm.go"]
>       ?: 0 [symbol->string "STRING"]
> 
>    ERROR: In procedure symbol->string:
>    ERROR: In procedure symbol->string: Wrong type argument in position 1 (expecting symbol): "STRING"
> 
> and the non-auto-compiled backtrace is similar
> 
>    In module/ice-9/boot-9.scm:
>    1917: 5 [save-module-excursion #<procedure b5b180 at module/ice-9/boot-9.scm:3341:3 ()>]
>    3348: 4 [#<procedure b5b180 at module/ice-9/boot-9.scm:3341:3 ()>]
>    1189: 3 [%start-stack load-stack ...]
>    1194: 2 [#<procedure a762d0 ()>]
>    In unknown file:
>       ?: 1 [primitive-load "/home/mike/Documents/code/guile_backtrace/symbol1.scm"]
>       ?: 0 [symbol->string "STRING"]
> 
>    ERROR: In procedure symbol->string:
>    ERROR: In procedure symbol->string: Wrong type argument in position 1 (expecting symbol): "STRING"
> 

When booting and before loading the script indicated by the -s switch,
guile comes to operate in a ``virtual file'' in which the command line is
processed, among other things. It's not really a file, thence unknown, it just behaves, at
least for the debugger's viewpoint, like a file containing the
instruction to load symbol1.scm or compiling load1.scm and thereupon
load the compiled code.

Klaus Schilling



  reply	other threads:[~2011-02-22  7:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22  3:23 Backtraces in Guile 2.0 Mike Gran
2011-02-22  7:44 ` Klaus Schilling [this message]
2011-02-22  8:20 ` Andy Wingo
  -- strict thread matches above, loose matches on Subject: below --
2011-02-22 17:53 Mike Gran
2011-02-22 19:13 ` Andy Wingo
2011-02-22 19:44   ` Linas Vepstas
2011-02-22 19:55 Mike Gran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110222.084439.08404263.schilling.klaus@web.de \
    --to=schilling.klaus@web.de \
    --cc=guile-user@gnu.org \
    --cc=spk121@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).