From 832cd490582f167381efc64b98b399c3db8b1759 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Sun, 8 Jun 2003 12:15:53 +0000 Subject: [PATCH] Ease disassembling closures and funcallable instances. From Alexey Dejneka in SBCL. * src/compiler/disassem.lisp (fun-address): Deal with closures and funcallable instances. --- compiler/disassem.lisp | 10 ++++++++-- general-info/release-19a.txt | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/compiler/disassem.lisp b/compiler/disassem.lisp index b089b1815..ae361a4a1 100644 --- a/compiler/disassem.lisp +++ b/compiler/disassem.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/disassem.lisp,v 1.39 2003/04/30 16:48:50 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/disassem.lisp,v 1.40 2003/06/08 12:15:53 gerd Exp $") ;;; ;;; ********************************************************************** ;;; @@ -2015,7 +2015,13 @@ (defun fun-address (function) (declare (type compiled-function function)) - (- (kernel:get-lisp-obj-address function) vm:function-pointer-type)) + (ecase (kernel:get-type function) + (vm:function-header-type + (- (kernel:get-lisp-obj-address function) vm:function-pointer-type)) + (vm:closure-header-type + (fun-address (kernel:%closure-function fun))) + (vm:funcallable-instance-header-type + (fun-address (kernel:funcallable-instance-function fun))))) (defun fun-insts-offset (function) "Offset of FUNCTION from the start of its code-component's instruction area." diff --git a/general-info/release-19a.txt b/general-info/release-19a.txt index 0a953450c..76ab710b9 100644 --- a/general-info/release-19a.txt +++ b/general-info/release-19a.txt @@ -56,6 +56,7 @@ New in this release: - UNIX:UNIX-LSEEK working with files > 2G on BSDs. - Type declarations on local bindings of special variables no longer being ignored. + - DISASSEMBLE disassembling closure/funcallable instance functions. * Numerous ANSI compliance fixes: - Many bugs in CMUCL's type system detected by Paul Dietz' -- GitLab