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: Linas Vepstas
Subject: Re: Backtraces in Guile 2.0
Date: Tue, 22 Feb 2011 13:44:26 -0600

Hi,

On 22 February 2011 13:13, Andy Wingo <address@hidden> wrote:
> On Tue 22 Feb 2011 18:53, Mike Gran <address@hidden> writes:
>
>> So, the specific line on which the error occurred will always read
>> "in unknown file" because source data is a property of procedures.  And,
>> when procedure A tail-calls procedure B, the backtrace may only
>> display the information of the procedure A.  Right?
>
> Right.
>
>> Thus, if I understand correctly, the closest I can get to getting source
>> info for this trivial case would be to change the script to
>>
>>   (symbol->string "HELLO")
>>   #t
>
> Yep.
>
>> Adding a #t so it can't be tail-called.  Then I get
>>
>> In unknown file:
>>    ?: 2 [load-compiled/vm 
>> "/home/Mike/.cache/guile/ccache/2.0-LE-4-2.0/home/Mike/tmp.scm.go"]
>> In /home/Mike/tmp.scm:
>>    1: 1 [#<procedure 13fa550 ()>]
>> In unknown file:
>>    ?: 0 [symbol->string "STRING"]
>> ERROR: In procedure symbol->string:
>
> Is this what you want?  It seems right to me...

Well, I'm not exactly following all of the argument, so the following might
be off the mark, and not an issue, but, superficially at least ...

If there are multiple large files involved, and one of them has a bug,
and there's no printing of the filename, then locating the offending code
could be tedious & tricky .. one can't just try to alter every possible
tail call in one's code to see if its buggy .. !?

--linas



reply via email to

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