[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/sly dcfe556 02/47: Fixed sldb and backtraces in clasp
From: |
ELPA Syncer |
Subject: |
[nongnu] externals/sly dcfe556 02/47: Fixed sldb and backtraces in clasp |
Date: |
Thu, 17 Dec 2020 18:57:12 -0500 (EST) |
branch: externals/sly
commit dcfe5562f4e1ac204a5720e870be360b2ac202f4
Author: Chris Schafmeister <meister@temple.edu>
Commit: João Távora <joaotavora@gmail.com>
Fixed sldb and backtraces in clasp
Use the core:call-with-backtrace and pass it a closure
that runs within an environment where the backtrace is valid.
* slynk/backend/clasp.lisp (call-with-debugging-environment): Rework.
(*saved-backtrace*): Remove.
Cherry-picked-from: SLIME commit 06f6d9829d9d1eace93efb4d00c724ceab667079
Co-authored-by: Manfred Bergmann <manfred@nnamgreb.de>
Co-authored-by: João Távora <joaotavora@gmail.com>
---
slynk/backend/clasp.lisp | 50 ++++++++++++++++++++----------------------------
1 file changed, 21 insertions(+), 29 deletions(-)
diff --git a/slynk/backend/clasp.lisp b/slynk/backend/clasp.lisp
index acc4ccb..7db7796 100644
--- a/slynk/backend/clasp.lisp
+++ b/slynk/backend/clasp.lisp
@@ -464,41 +464,33 @@
;; (declare (ignore position))
;; (if file (is-slynk-source-p file)))))
-(defparameter *saved-backtrace* nil)
(defimplementation call-with-debugging-environment (debugger-loop-fn)
(declare (type function debugger-loop-fn))
(let* ((*ihs-top* 0)
(*ihs-current* *ihs-top*)
#+frs (*frs-base* (or (sch-frs-base *frs-top* *ihs-base*) (1+
(frs-top))))
#+frs (*frs-top* (frs-top))
- (*tpl-level* (1+ *tpl-level*))
- (*backtrace* (let ((backtrace (core::common-lisp-backtrace-frames
- :gather-start-trigger
- (lambda (frame)
- (let ((function-name
(core::backtrace-frame-function-name frame)))
- (and (symbolp function-name)
- (eq function-name
'core::universal-error-handler))))
- :gather-all-frames nil)))
- (unless backtrace
- (setq backtrace (core::common-lisp-backtrace-frames
- :gather-all-frames nil)))
- backtrace)))
- (declare (special *ihs-current*))
- (setq *saved-backtrace* *backtrace*)
- #+(or)
- (progn
- (format ext:+process-standard-output+ "---------------
call-with-debugging-environment -----------~%")
- (format ext:+process-standard-output+ "(length *backtrace*) -> ~a ~%"
(length *backtrace*))
- (format ext:+process-standard-output+ "Raw backtrace length: ~a ~%"
(length (core:clib-backtrace-as-list)))
- (format ext:+process-standard-output+ "Common Lisp backtrace frames
length: ~a ~%" (length (core::common-lisp-backtrace-frames)))
- (loop for f in (core::common-lisp-backtrace-frames)
- for id from 0
- do (progn
- (format ext:+process-standard-output+ "Frame ~a: (~a ~a)~%"
id (core::backtrace-frame-print-name f) (core::backtrace-frame-arguments f)))))
- (set-break-env)
- (set-current-ihs)
- (let ((*ihs-base* *ihs-top*))
- (funcall debugger-loop-fn))))
+ (*tpl-level* (1+ *tpl-level*)))
+ (core:call-with-backtrace
+ (lambda (raw-backtrace)
+ (let ((*backtrace*
+ (let ((backtrace (core::common-lisp-backtrace-frames
+ raw-backtrace
+ :gather-start-trigger
+ (lambda (frame)
+ (let ((function-name
(core::backtrace-frame-function-name frame)))
+ (and (symbolp function-name)
+ (eq function-name
'core::universal-error-handler))))
+ :gather-all-frames nil)))
+ (unless backtrace
+ (setq backtrace (core::common-lisp-backtrace-frames
+ :gather-all-frames nil)))
+ backtrace)))
+ (declare (special *ihs-current*))
+ (set-break-env)
+ (set-current-ihs)
+ (let ((*ihs-base* *ihs-top*))
+ (funcall debugger-loop-fn)))))))
(defimplementation compute-backtrace (start end)
(subseq *backtrace* start
- [nongnu] externals/sly updated (0207e2d -> e927cda), ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 7ea4480 16/47: Clasp changes to use the new line keyword arg, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 6662cf2 29/47: sbcl: Ignore DEFGENERICs without location, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly c41b298 36/47: clasp.lisp changes to use new clasp-debug pkg, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly d8c926f 42/47: sbcl: account for SB-DI::DEBUG-FUN-DEBUG-VARS returning NIL, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 7c7f23b 46/47: Default *STRING-ELISION-LEGNTH* to 200 in *SLYNK-PPRINT-BINDINGS*, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 7bad394 09/47: Improve compiler messages for Clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly c4c7ae5 13/47: slynk-abcl: fix typo, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly c794fe6 30/47: Remove recursive locks for clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 57ffb2a 33/47: sbcl: fix access to &more vars in the debugger, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly dcfe556 02/47: Fixed sldb and backtraces in clasp,
ELPA Syncer <=
- [nongnu] externals/sly 1dbf876 04/47: ecl: frame-source-location: return error if frame source not found, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly cd85cf6 35/47: Improve xref definitions for M-. in clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 6785833 37/47: clasp: implement profiling via metering, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 1346967 38/47: Remove use of compatibility accessors, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly e914200 07/47: wait-for-input: better "not implemented" error., ELPA Syncer, 2020/12/17
- [nongnu] externals/sly e883812 11/47: Fix SLYNK-SBCL:COMPILER-NOTE-LOCATION for non-file-backed streams, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 425146d 31/47: Print more code-source-location info for clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 1188cfc 34/47: Ignore utf-8 encoding errors, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 4717cb9 44/47: Tolerate leading whitespace in slime-search-buffer-package, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 00cbab0 01/47: Slynk: avoid race conditions when killing threads, ELPA Syncer, 2020/12/17