X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdebug-info.lisp;h=61ea19fbddef38b2da7e01d6a830f3663badb68b;hb=bee53328c93be3433477821131ab805557476c8b;hp=23326d0fa6f6dc2d855944b11ec2d317b5d1899b;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/code/debug-info.lisp b/src/code/debug-info.lisp index 23326d0..61ea19f 100644 --- a/src/code/debug-info.lisp +++ b/src/code/debug-info.lisp @@ -16,8 +16,8 @@ ;;;; 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 sc-offset-scn-byte (byte 5 0)) -(defconstant sc-offset-offset-byte (byte 22 5)) +(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) @@ -73,13 +73,13 @@ ;;;; ...more ;;;; tuples... -(defconstant compiled-debug-block-nsucc-byte (byte 2 0)) +(defconstant-eqx compiled-debug-block-nsucc-byte (byte 2 0) #'equalp) (defconstant compiled-debug-block-elsewhere-p #b00000100) -(defconstant compiled-code-location-kind-byte (byte 3 0)) -(defconstant compiled-code-location-kinds - '#(:unknown-return :known-return :internal-error :non-local-exit - :block-start :call-site :single-value-return :non-local-entry)) +(defconstant-eqx compiled-code-location-kind-byte (byte 3 0) #'equalp) +(defparameter *compiled-code-location-kinds* + #(:unknown-return :known-return :internal-error :non-local-exit + :block-start :call-site :single-value-return :non-local-entry)) ;;;; DEBUG-FUNCTION objects @@ -146,7 +146,7 @@ ;; The following two locations are the more arg context and count. ;; ;; - ;; The following location is the value of the keyword argument with the + ;; The following location is the value of the &KEY argument with the ;; specified name. ;; ;; This may be NIL to save space. If no symbols are present, then this will @@ -234,55 +234,53 @@ Well, I guess you need to at least know which function is an XEP for the real function (which would be useful info anyway). |# -;;; Following are definitions of bit-fields in the first byte of the minimal -;;; debug function: +;;; The following are definitions of bit-fields in the first byte of +;;; the minimal debug function: (defconstant minimal-debug-function-name-symbol 0) (defconstant minimal-debug-function-name-packaged 1) (defconstant minimal-debug-function-name-uninterned 2) (defconstant minimal-debug-function-name-component 3) -(defconstant minimal-debug-function-name-style-byte (byte 2 0)) -(defconstant minimal-debug-function-kind-byte (byte 3 2)) -(defconstant minimal-debug-function-kinds - '#(nil :optional :external :top-level :cleanup)) +(defconstant-eqx minimal-debug-function-name-style-byte (byte 2 0) #'equalp) +(defconstant-eqx minimal-debug-function-kind-byte (byte 3 2) #'equalp) +(defparameter *minimal-debug-function-kinds* + #(nil :optional :external :top-level :cleanup)) (defconstant minimal-debug-function-returns-standard 0) (defconstant minimal-debug-function-returns-specified 1) (defconstant minimal-debug-function-returns-fixed 2) -(defconstant minimal-debug-function-returns-byte (byte 2 5)) +(defconstant-eqx minimal-debug-function-returns-byte (byte 2 5) #'equalp) ;;; The following are bit-flags in the second byte of the minimal debug ;;; function: - -;;; If true, wrap (SETF ...) around the name. +;;; * If true, wrap (SETF ...) around the name. (defconstant minimal-debug-function-setf-bit (ash 1 0)) - -;;; If true, there is a NFP. +;;; * If true, there is a NFP. (defconstant minimal-debug-function-nfp-bit (ash 1 1)) - -;;; If true, variables (hence arguments) have been dumped. +;;; * If true, variables (hence arguments) have been dumped. (defconstant minimal-debug-function-variables-bit (ash 1 2)) ;;;; debug source (def!struct (debug-source #-sb-xc-host (:pure t)) ;; This slot indicates where the definition came from: - ;; :File - from a file (Compile-File) - ;; :Lisp - from Lisp (Compile) + ;; :FILE - from a file (i.e. COMPILE-FILE) + ;; :LISP - from Lisp (i.e. COMPILE) (from (required-argument) :type (member :file :lisp)) - ;; If :File, the file name, if :Lisp or :Stream, then a vector of the - ;; top-level forms. When from COMPILE, form 0 is #'(LAMBDA ...). + ;; If :FILE, the file name, if :LISP or :STREAM, then a vector of + ;; the top-level forms. When from COMPILE, form 0 is #'(LAMBDA ...). (name nil) - ;; File comment for this file, if any. - (comment nil :type (or simple-string null)) - ;; The universal time that the source was written, or NIL if unavailable. + ;; the universal time that the source was written, or NIL if + ;; unavailable (created nil :type (or unsigned-byte null)) - ;; The universal time that the source was compiled. + ;; the universal time that the source was compiled (compiled (required-argument) :type unsigned-byte) - ;; The source path root number of the first form read from this source (i.e. - ;; the total number of forms converted previously in this compilation.) + ;; the source path root number of the first form read from this + ;; source (i.e. the total number of forms converted previously in + ;; this compilation) (source-root 0 :type index) - ;; The file-positions of each truly top-level form read from this file (if - ;; applicable). The vector element type will be chosen to hold the largest - ;; element. May be null to save space. + ;; The FILE-POSITIONs of the truly top-level forms read from this + ;; file (if applicable). The vector element type will be chosen to + ;; hold the largest element. May be null to save space, or if + ;; :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)) @@ -295,21 +293,25 @@ function (which would be useful info anyway). ;; A list of DEBUG-SOURCE structures describing where the code for this ;; component came from, in the order that they were read. ;; - ;; *** NOTE: the offset of this slot is wired into the fasl dumper so that it - ;; *** can backpatch the source info when compilation is complete. + ;; KLUDGE: comment from CMU CL: + ;; *** 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)) (def!struct (compiled-debug-info (:include debug-info) #-sb-xc-host (:pure t)) - ;; a simple-vector of alternating DEBUG-FUNCTION objects and fixnum PCs, - ;; used to map PCs to functions, so that we can figure out what function we - ;; were running in. Each function is valid between the PC before it - ;; (inclusive) and the PC after it (exclusive). The PCs are in sorted order, - ;; to allow binary search. We omit the first and last PC, since their values - ;; are 0 and the length of the code vector. + ;; a simple-vector of alternating DEBUG-FUNCTION objects and fixnum + ;; PCs, used to map PCs to functions, so that we can figure out what + ;; function we were running in. Each function is valid between the + ;; PC before it (inclusive) and the PC after it (exclusive). The PCs + ;; are in sorted order, to allow binary search. We omit the first + ;; and last PC, since their values are 0 and the length of the code + ;; vector. ;; - ;; KLUDGE: PC's can't always be represented by FIXNUMs, unless we're always - ;; careful to put our code in low memory. Is that how it works? Would this - ;; break if we used a more general memory map? -- WHN 20000120 + ;; KLUDGE: PC's can't always be represented by FIXNUMs, unless we're + ;; always careful to put our code in low memory. Is that how it + ;; works? Would this break if we used a more general memory map? -- + ;; WHN 20000120 (function-map (required-argument) :type simple-vector :read-only t))