X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdebug-info.lisp;h=3ca15e08e97722ed9f5294d5c964a48175273b74;hb=1af3faa2b79125b774c2182cab841ed7ee555bed;hp=9b58481bb085634bcde12151d7a7bf2d4b0ade04;hpb=581e3d62de8cb37e13ad9db63e5537c0f962be28;p=sbcl.git diff --git a/src/code/debug-info.lisp b/src/code/debug-info.lisp index 9b58481..3ca15e0 100644 --- a/src/code/debug-info.lisp +++ b/src/code/debug-info.lisp @@ -11,22 +11,6 @@ (in-package "SB!C") -;;;; SC-OFFSETs -;;;; -;;;; We represent the place where some value is stored with a SC-OFFSET, -;;;; which is the SC number and offset encoded as an integer. - -(defconstant-eqx sc-offset-scn-byte (byte 5 0) #'equalp) -(defconstant-eqx sc-offset-offset-byte (byte 22 5) #'equalp) -(def!type sc-offset () '(unsigned-byte 27)) - -(defmacro make-sc-offset (scn offset) - `(dpb ,scn sc-offset-scn-byte - (dpb ,offset sc-offset-offset-byte 0))) - -(defmacro sc-offset-scn (sco) `(ldb sc-offset-scn-byte ,sco)) -(defmacro sc-offset-offset (sco) `(ldb sc-offset-offset-byte ,sco)) - ;;;; flags for compiled debug variables ;;; FIXME: old CMU CL representation follows: @@ -91,7 +75,7 @@ ;; CMU CL, there are two distinct -- but coupled -- mechanisms to ;; finding the name of a function. The slot here is one mechanism ;; (used in CMU CL to look up names in the debugger, e.g. in - ;; BACKTRACE). The other mechanism is the the NAME slot in function + ;; BACKTRACE). The other mechanism is the NAME slot in function ;; primitive objects (used in CMU CL to look up names elsewhere, ;; e.g. in CL:FUNCTION-LAMBDA-EXPRESSION and in CL:DESCRIBE). ;; @@ -248,8 +232,10 @@ ;;; to at least know which function is an XEP for the real function ;;; (which would be useful info anyway). -;;;; debug source +;;;; DEBUG SOURCE +;;; There is one per compiled file and one per function compiled at +;;; toplevel or loaded from source. (def!struct (debug-source #-sb-xc-host (:pure t)) ;; This slot indicates where the definition came from: ;; :FILE - from a file (i.e. COMPILE-FILE) @@ -273,13 +259,15 @@ ;; :DEBUG-SOURCE-FORM is :LISP. (start-positions nil :type (or (simple-array * (*)) null)) ;; If from :LISP, this is the function whose source is form 0. - (info nil)) + (function nil) + ;; Additional information from (WITH-COMPILATION-UNIT (:SOURCE-PLIST ...)) + (plist *source-plist*)) ;;;; DEBUG-INFO structures (def!struct debug-info ;; Some string describing something about the code in this component. - (name (missing-arg) :type simple-string) + (name (missing-arg) :type t) ;; A list of DEBUG-SOURCE structures describing where the code for this ;; component came from, in the order that they were read. ;; @@ -287,7 +275,7 @@ ;; *** NOTE: the offset of this slot is wired into the fasl dumper ;; *** so that it can backpatch the source info when compilation ;; *** is complete. - (source nil :type list)) + (source nil)) (def!struct (compiled-debug-info (:include debug-info)