guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Backtraces in Guile 2.0


From: Klaus Schilling
Subject: Re: Backtraces in Guile 2.0
Date: Tue, 22 Feb 2011 08:44:39 +0100 (CET)

From: Mike Gran <address@hidden>
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 via email to

[Prev in Thread] Current Thread [Next in Thread]