diff -Nru cl-trivial-backtrace-20160531/debian/changelog cl-trivial-backtrace-20190610.git57a8df7/debian/changelog --- cl-trivial-backtrace-20160531/debian/changelog 2016-08-29 18:56:05.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/changelog 2020-01-18 21:06:56.000000000 +0000 @@ -1,3 +1,27 @@ +cl-trivial-backtrace (20190610.git57a8df7-1) unstable; urgency=medium + + * New upstream release + * Add debian/watch + * Improve long description + * Move maintenance to Debian Common Lisp Team. + Thanks to Dimitri Fontaine for his work + * Bump to debhelper compat level 12 + * Remove Build-Depends on dh-lisp + * Add Rules-Requires-Root: no + * Mark as M-A foreign + * Use secure URL for Homepage + * Update Vcs-* fields for move to salsa + * Bump to S-V 4.4.1 + * Simplify debian/rules + * Drop symlink under /u/s/common-lisp/systems + * Ship the testsuite + * Update debian/copyright + * Add autopkgtest that tries to load the package on sbcl, ecl and clisp + (exercising the testsuite is not yet possible since lift is not + packaged) + + -- Sébastien Villemot Sat, 18 Jan 2020 22:06:56 +0100 + cl-trivial-backtrace (20160531-1) unstable; urgency=medium * Quicklisp release update. diff -Nru cl-trivial-backtrace-20160531/debian/compat cl-trivial-backtrace-20190610.git57a8df7/debian/compat --- cl-trivial-backtrace-20160531/debian/compat 2014-04-30 14:01:04.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -7 \ No newline at end of file diff -Nru cl-trivial-backtrace-20160531/debian/control cl-trivial-backtrace-20190610.git57a8df7/debian/control --- cl-trivial-backtrace-20160531/debian/control 2015-05-02 13:53:15.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/control 2020-01-18 21:06:56.000000000 +0000 @@ -1,21 +1,24 @@ Source: cl-trivial-backtrace Section: lisp Priority: optional -Maintainer: Dimitri Fontaine -Build-Depends: debhelper (>= 7) -Build-Depends-Indep: dh-lisp -Standards-Version: 3.9.6 -Homepage: http://common-lisp.net/project/trivial-backtrace/ -Vcs-Git: http://common-lisp.net/project/trivial-backtrace/trivial-backtrace.git +Maintainer: Debian Common Lisp Team +Uploaders: Sébastien Villemot +Build-Depends: debhelper-compat (= 12) +Standards-Version: 4.4.1 +Homepage: https://common-lisp.net/project/trivial-backtrace/ +Vcs-Git: https://salsa.debian.org/common-lisp-team/cl-trivial-backtrace.git +Vcs-Browser: https://salsa.debian.org/common-lisp-team/cl-trivial-backtrace +Rules-Requires-Root: no Package: cl-trivial-backtrace Architecture: all +Multi-Arch: foreign Depends: ${misc:Depends} Description: generate a Common Lisp backtrace portably - On of the many things that didn't quite get into the Common Lisp standard + One of the many things that didn't quite get into the Common Lisp standard was how to get a Lisp to output its call stack when something has gone wrong. As such, each Lisp has developed its own notion of what to display, how to display it, and what sort of arguments can be used to customize it. trivial-backtrace is a simple solution to generating a backtrace portably. - As of 16 May 2012, it supports Allegro Common Lisp, LispWorks, ECL, MCL, - SCL, SBCL and CMUCL. \ No newline at end of file + . + It supports Allegro Common Lisp, LispWorks, ECL, MCL, SCL, SBCL and CMUCL. diff -Nru cl-trivial-backtrace-20160531/debian/copyright cl-trivial-backtrace-20190610.git57a8df7/debian/copyright --- cl-trivial-backtrace-20160531/debian/copyright 2014-08-22 15:00:41.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/copyright 2020-01-18 21:06:56.000000000 +0000 @@ -1,13 +1,12 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: tricial-backtrace +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: trivial-backtrace Upstream-Contact: Gary Warren King -Source: http://common-lisp.net/project/trivial-backtrace/ +Source: https://common-lisp.net/project/trivial-backtrace/ Files: * -Copyright: - 2008-2008 Gary Warren King (gwking@metabang.com) - Copyright (c) 2005-2007 Dr. Edi Weitz -License: +Copyright: 2008-2011 Gary Warren King (gwking@metabang.com) + 2005-2007 Dr. Edi Weitz +License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation diff -Nru cl-trivial-backtrace-20160531/debian/docs cl-trivial-backtrace-20190610.git57a8df7/debian/docs --- cl-trivial-backtrace-20160531/debian/docs 1970-01-01 00:00:00.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/docs 2020-01-18 21:06:56.000000000 +0000 @@ -0,0 +1 @@ +website/source/index.md diff -Nru cl-trivial-backtrace-20160531/debian/install cl-trivial-backtrace-20190610.git57a8df7/debian/install --- cl-trivial-backtrace-20160531/debian/install 1970-01-01 00:00:00.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/install 2020-01-18 21:06:56.000000000 +0000 @@ -0,0 +1 @@ +*.asd dev test lift-standard.config /usr/share/common-lisp/source/trivial-backtrace/ diff -Nru cl-trivial-backtrace-20160531/debian/rules cl-trivial-backtrace-20190610.git57a8df7/debian/rules --- cl-trivial-backtrace-20160531/debian/rules 2014-07-23 13:12:26.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/rules 2020-01-18 21:06:56.000000000 +0000 @@ -1,19 +1,4 @@ #!/usr/bin/make -f -pkg := trivial-backtrace -clc-source := usr/share/common-lisp/source -clc-systems := usr/share/common-lisp/systems -clc-files := $(clc-source)/$(pkg) - %: - dh $@ --with lisp - -override_dh_install: - dh_install $(pkg).asd $(clc-files) - dh_install dev $(clc-files) - -override_dh_link: - dh_link $(clc-files)/$(pkg).asd $(clc-systems)/$(pkg).asd - -override_dh_installdocs: - dh_installdocs website/source/index.md + dh $@ diff -Nru cl-trivial-backtrace-20160531/debian/tests/control cl-trivial-backtrace-20190610.git57a8df7/debian/tests/control --- cl-trivial-backtrace-20160531/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/tests/control 2020-01-18 21:06:56.000000000 +0000 @@ -0,0 +1,11 @@ +Test-Command: sbcl --script debian/tests/runtests.lisp +Depends: @, sbcl +Restrictions: allow-stderr + +Test-Command: ecl -norc -shell debian/tests/runtests.lisp +Depends: @, ecl +Restrictions: allow-stderr + +Test-Command: clisp -norc debian/tests/runtests.lisp +Depends: @, clisp +Restrictions: allow-stderr diff -Nru cl-trivial-backtrace-20160531/debian/tests/runtests.lisp cl-trivial-backtrace-20190610.git57a8df7/debian/tests/runtests.lisp --- cl-trivial-backtrace-20160531/debian/tests/runtests.lisp 1970-01-01 00:00:00.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/tests/runtests.lisp 2020-01-18 21:06:56.000000000 +0000 @@ -0,0 +1,4 @@ +(require "asdf") + +(let ((asdf:*user-cache* (uiop:getenv "AUTOPKGTEST_TMP"))) ; Store FASL in some temporary dir + (asdf:load-system "trivial-backtrace")) diff -Nru cl-trivial-backtrace-20160531/debian/watch cl-trivial-backtrace-20190610.git57a8df7/debian/watch --- cl-trivial-backtrace-20160531/debian/watch 1970-01-01 00:00:00.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/debian/watch 2020-01-18 21:06:52.000000000 +0000 @@ -0,0 +1,4 @@ +version=4 +opts="mode=git, pgpmode=none, pretty=%cd.git%h" \ +https://github.com/gwkkwg/trivial-backtrace.git \ +HEAD debian uupdate diff -Nru cl-trivial-backtrace-20160531/dev/backtrace.lisp cl-trivial-backtrace-20190610.git57a8df7/dev/backtrace.lisp --- cl-trivial-backtrace-20160531/dev/backtrace.lisp 2016-05-22 17:28:45.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/dev/backtrace.lisp 2019-06-10 15:43:00.000000000 +0000 @@ -41,12 +41,12 @@ (stream (values output nil))) (unwind-protect (progn - (format stream "~&Date/time: ~a" (date-time-string)) + (format stream "~&Date/time: ~a!~%" (date-time-string)) (print-condition error stream) (terpri stream) (print-backtrace-to-stream stream) (terpri stream) - (when (typep stream 'string-stream) + (when (null output) (get-output-stream-string stream))) ;; cleanup (when close? @@ -101,7 +101,7 @@ (sb-debug:*debug-print-level* nil) #-:sbcl-debug-print-variable-alist (sb-debug:*debug-print-length* nil)) - (sb-debug:print-backtrace :count most-positive-fixnum :stream stream))) + (sb-debug:print-backtrace :count most-positive-fixnum :stream stream :emergency-best-effort t))) #+clisp (defun print-backtrace-to-stream (stream) @@ -113,6 +113,9 @@ (debug:*debug-print-length* nil)) (debug:backtrace most-positive-fixnum stream))) +#+clasp +(defun print-backtrace-to-stream (stream) + (core:btcl :stream stream)) ;; must be after the defun above or the docstring may be wiped out (setf (documentation 'print-backtrace-to-stream 'function) diff -Nru cl-trivial-backtrace-20160531/dev/map-backtrace.lisp cl-trivial-backtrace-20190610.git57a8df7/dev/map-backtrace.lisp --- cl-trivial-backtrace-20160531/dev/map-backtrace.lisp 2016-05-22 17:28:45.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/dev/map-backtrace.lisp 2019-06-10 15:43:00.000000000 +0000 @@ -99,7 +99,28 @@ :value (sb-di:debug-var-value v f))))) (ignore-errors (sb-di::debug-fun-debug-vars (sb-di:frame-debug-fun f))))))))) -#-(or ccl sbcl) +#+clasp +(defun impl-map-backtrace (func) + (core:call-with-backtrace + #'(lambda(raw-backtrace) + (dolist (clasp-frame (core:common-lisp-backtrace-frames raw-backtrace)) + (let* ((address (core::backtrace-frame-return-address clasp-frame)) + (code-source-location-or-nil nil #+(or) (ext:code-source-position address))) + (funcall func + (make-frame :func (core::backtrace-frame-print-name clasp-frame) + :source-filename (if code-source-location-or-nil + (namestring (ext::code-source-line-source-pathname code-source-location-or-nil)) + nil) + :source-pos (if code-source-location-or-nil + (ext::code-source-line-line-number code-source-location-or-nil) + nil) + :vars (let ((index -1)) + (mapcar #'(lambda(var) + (incf index) + (make-var :name (format nil "Arg(~a)" index) :value var)) + (coerce (core::backtrace-frame-arguments clasp-frame) 'list)))))))))) + +#-(or ccl sbcl clasp) (defun impl-map-backtrace (func) (declare (ignore func)) - (warn "unable to map backtrace for ~a" (lisp-implementation-type))) \ No newline at end of file + (warn "unable to map backtrace for ~a" (lisp-implementation-type))) diff -Nru cl-trivial-backtrace-20160531/test/tests.lisp cl-trivial-backtrace-20190610.git57a8df7/test/tests.lisp --- cl-trivial-backtrace-20160531/test/tests.lisp 2016-05-22 17:28:45.000000000 +0000 +++ cl-trivial-backtrace-20190610.git57a8df7/test/tests.lisp 2019-06-10 15:43:00.000000000 +0000 @@ -15,3 +15,17 @@ (setf output (print-backtrace c :output nil)))) (ensure (stringp output)) (ensure (plusp (length output))))) + +(addtest (generates-backtrace-to-string-stream) + test-2 + (let ((output nil)) + (handler-case + (let ((x 1)) + (let ((y (- x (expt 1024 0)))) + (declare (optimize (safety 3))) + (/ 2 y))) + (error (c) + (setf output (with-output-to-string (stream) + (print-backtrace c :output nil))))) + (ensure (stringp output)) + (ensure (plusp (length output)))))