[armedbear-devel] [PATCH] incorporating java stack frames into backtrace

Tobias C. Rittweiler tcr at freebits.de
Tue Jul 14 16:46:53 UTC 2009


When evaluating

   (ext:make-thread #'(lambda ()))

you get an error "The value NIL is not of type STRING." -- this is a bug
in ABCL itself, by the way, but that's not the matter of this mail.

The concern of this mail is the backtrace that'd you get:

  Backtrace:
    0: (INVOKE-DEBUGGER #<TYPE-ERROR {B1A201}>)
    1: (MAKE-THREAD #<FUNCTION (LAMBDA ()) {15343C2}>)
    2: (SYSTEM::%EVAL (MAKE-THREAD #'(LAMBDA NIL)))
    3: (EVAL (MAKE-THREAD #'(LAMBDA NIL)))
    ...

The only thing the backtrace reveales is that the error was signalled
somewhere in MAKE-THREAD.

With the patch of this mail, the backtrace will also contain the
relevant Java stack frames for errors that were signalled from within
ABCL's Java runtime:

  Backtrace:
    0: (INVOKE-DEBUGGER #<TYPE-ERROR {B1A201}>)
    1: org.armedbear.lisp.Lisp.error(Lisp.java:375)
    2: org.armedbear.lisp.Lisp.type_error(Lisp.java:390)
    3: org.armedbear.lisp.LispObject.getStringValue(LispObject.java:1061)
    4: org.armedbear.lisp.LispThread.<init>(LispThread.java:111)
    5: org.armedbear.lisp.LispThread.<init>(LispThread.java:39)
    6: org.armedbear.lisp.LispThread$3.execute(LispThread.java:909)
    7: org.armedbear.lisp.Primitive.execute(Primitive.java:108)
    8: (MAKE-THREAD #<FUNCTION (LAMBDA ()) {15343C2}>)
    9: (SYSTEM::%EVAL (MAKE-THREAD #'(LAMBDA NIL)))
   10: (EVAL (MAKE-THREAD #'(LAMBDA NIL)))

Another example: (LENGTH 12)

  Backtrace:
    0: (INVOKE-DEBUGGER #<TYPE-ERROR {814AF5}>)
    1: org.armedbear.lisp.Lisp.error(Lisp.java:375)
    2: org.armedbear.lisp.Lisp.type_error(Lisp.java:390)
    3: org.armedbear.lisp.LispObject.length(LispObject.java:403)
    4: org.armedbear.lisp.LispObject.LENGTH(LispObject.java:410)
    5: org.armedbear.lisp.Primitives$24.execute(Primitives.java:427)
    6: (LENGTH 12)
    7: (SYSTEM::%EVAL (LENGTH 12))
    8: (EVAL (LENGTH 12))

  -T.


-- 
Diese Nachricht wurde auf Viren und andere gefaerliche Inhalte untersucht
und ist - aktuelle Virenscanner vorausgesetzt - sauber.
Freebits E-Mail Virus Scanner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: incorporate-java-frames-into-backtraces.diff
Type: text/x-diff
Size: 27081 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20090714/77aeeb6f/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swank-abcl-backtrace.diff
Type: text/x-diff
Size: 2368 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20090714/77aeeb6f/attachment-0001.diff>


More information about the armedbear-devel mailing list