guile-devel
[Top][All Lists]
Advanced

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

Use GNU standard for displaying backtraces?


From: Jan Nieuwenhuizen
Subject: Use GNU standard for displaying backtraces?
Date: Fri, 8 Aug 2014 20:22:59 +0200

Hi,

Trying to get Emacs's compilation-mode to support stepping down Guile
backtraces, I wrote some elisp code to determine the absolute file
name for incomplete relative files that come from Guile's load path,
e.g., ice/boot-9.scm.

Resolving this in Emacs is very difficult to do cleanly, if at all
possible.  Also, supporting other editors will have the same problem.
See: https://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00137.html

That's why I propose to discuss this patch.  It changes the backtrace
output from

    guile --debug -e main examples/gud-break.scm
    Backtrace:
    In ice-9/boot-9.scm:
     157: 6 [catch #t #<catch-closure abe3e0> ...]
    In unknown file:
       ?: 5 [apply-smob/1 #<catch-closure abe3e0>]
    In ice-9/boot-9.scm:
      63: 4 [call-with-prompt prompt0 ...]
    In ice-9/eval.scm:
     432: 3 [eval # #]
    In unknown file:
       ?: 2 [eval (main (command-line)) #<directory (gud-break) ab2240>]
    In /home/janneke/vc/guile/examples/gud-break.scm:
    1038: 1 [main ("examples/gud-break.scm")]
    1032: 0 [stderr "~a:hello world\n" (# # #)]

    /home/janneke/vc/guile/examples/gud-break.scm:1032:0: In procedure stderr:
    /home/janneke/vc/guile/examples/gud-break.scm:1032:0: In procedure 
module-lookup: Unbound variable: o

to

    ~/guile-2.2/bin/guile --debug -e main examples/gud-break.scm
    Backtrace:
    unknown file:
       ?: 5 [apply-smob/1 #<catch-closure b9bca0>]
    /home/janneke/guile-2.2/share/guile/2.2/ice-9/boot-9.scm:732:
     732: 4 [call-with-prompt #<unbound> #<unbound> ...]
    /home/janneke/guile-2.2/share/guile/2.2/ice-9/eval.scm:527:
     527: 3 [eval _ #(#<directory (guile-user) b892d0>)]
    unknown file:
       ?: 2 [eval (main (command-line)) #<directory (gud-break) dc0360>]
    /home/janneke/vc/guile/examples/gud-break.scm:1038:
    1038: 1 [main . _]
    1032: 0 [stderr _ . _]

    /home/janneke/vc/guile/examples/gud-break.scm:1032:0: In procedure stderr:
    /home/janneke/vc/guile/examples/gud-break.scm:1032:0: In procedure 
module-lookup: Unbound variable: o

What do you think?

Stefan Monnier also suggests to postfix the backtrace line with `info',
something like

    /home/janneke/vc/guile/examples/gud-break.scm:1038:info:
    1038: 1 [main . _]
    1032: 0 [stderr _ . _]

however, I like to step down all lines of a backtrace with
next-error/previous-error, so haven't done that.

Greetings, Jan


-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ®  http://AvatarAcademy.nl  



reply via email to

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