branch: externals/sly commit 3c83b6f87d7ec87e989d44e3894d6ecaa27ef03e Author: Chris Schafmeister <meis...@temple.edu> Commit: João Távora <joaotav...@gmail.com>
Improve jump to source with 'v' in sldb in clasp We can now use the new "concrete syntax tree" compiler in Clasp with its amazing source tracking capabilities to jump to code. The 'v' key in sldb now jumps to the form that is indicated by the backtrace. Code, including anonymous functions, now have source locations! * slynk/backend/clasp.lisp (frame-source-location): Rework. Cherry-picked-from: SLIME commit 8d154a99e6818e2b7c223a25a6cb010fb278d306 Co-authored-by: Manfred Bergmann <manf...@nnamgreb.de> Co-authored-by: João Távora <joaotav...@gmail.com> --- slynk/backend/clasp.lisp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/slynk/backend/clasp.lisp b/slynk/backend/clasp.lisp index a8851af..b893ab3 100644 --- a/slynk/backend/clasp.lisp +++ b/slynk/backend/clasp.lisp @@ -523,7 +523,13 @@ (format stream "~a" (core::backtrace-frame-print-name frame)))) (defimplementation frame-source-location (frame-number) - (source-location (frame-function frame-number))) + (let* ((address (core::backtrace-frame-return-address (elt *backtrace* frame-number))) + (code-source-location (ext::code-source-position address))) + (format t "code-source-location ~s~%" code-source-location) + ;; (core::source-info-backtrace *backtrace*) + (make-location (list :file (namestring (ext::code-source-line-source-pathname code-source-location))) + (list :line (ext::code-source-line-line-number code-source-location)) + '(:align t)))) #+clasp-working (defimplementation frame-catch-tags (frame-number)