unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Linas Vepstas <linasvepstas@gmail.com>
To: Andy Wingo <wingo@pobox.com>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: Backtraces in Guile 2.0
Date: Tue, 22 Feb 2011 13:44:26 -0600	[thread overview]
Message-ID: <AANLkTinM2-4QcDFF2TQwhrG0Xvxnq7K3NS19oCKmr6SF@mail.gmail.com> (raw)
In-Reply-To: <m3r5azx4pf.fsf@unquote.localdomain>

Hi,

On 22 February 2011 13:13, Andy Wingo <wingo@pobox.com> wrote:
> On Tue 22 Feb 2011 18:53, Mike Gran <spk121@yahoo.com> 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	other threads:[~2011-02-22 19:44 UTC|newest]

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

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=AANLkTinM2-4QcDFF2TQwhrG0Xvxnq7K3NS19oCKmr6SF@mail.gmail.com \
    --to=linasvepstas@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=wingo@pobox.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).