0.pre7.113:
[sbcl.git] / src / code / debug-int.lisp
index 2362e87..071a476 100644 (file)
   ;; the DEBUG-FUN containing this CODE-LOCATION
   (debug-fun nil :type debug-fun)
   ;; This is initially :UNSURE. Upon first trying to access an
-  ;; :unparsed slot, if the data is unavailable, then this becomes t,
+  ;; :UNPARSED slot, if the data is unavailable, then this becomes T,
   ;; and the code-location is unknown. If the data is available, this
-  ;; becomes nil, a known location. We can't use a separate type
+  ;; becomes NIL, a known location. We can't use a separate type
   ;; code-location for this since we must return code-locations before
   ;; we can tell whether they're known or unknown. For example, when
   ;; parsing the stack, we don't want to unpack all the variables and
        (zerop (logand (sap-int x) #b11))))
 
 #!+x86
-(sb!alien:def-alien-routine component-ptr-from-pc (system-area-pointer)
+(sb!alien:define-alien-routine component-ptr-from-pc (system-area-pointer)
   (pc system-area-pointer))
 
 #!+x86
 \f
 ;;;; frame utilities
 
-;;; This returns a COMPILED-DEBUG-FUN for code and pc. We fetch the
+;;; This returns a COMPILED-DEBUG-FUN for COMPONENT and PC. We fetch the
 ;;; SB!C::DEBUG-INFO and run down its FUN-MAP to get a
-;;; SB!C::COMPILED-DEBUG-FUN from the pc. The result only needs to
-;;; reference the component, for function constants, and the
+;;; SB!C::COMPILED-DEBUG-FUN from the PC. The result only needs to
+;;; reference the COMPONENT, for function constants, and the
 ;;; SB!C::COMPILED-DEBUG-FUN.
 (defun debug-fun-from-pc (component pc)
   (let ((info (%code-debug-info component)))
      ((eq info :bogus-lra)
       (make-bogus-debug-fun "function end breakpoint"))
      (t
-      (let* ((fun-map (get-debug-info-fun-map info))
+      (let* ((fun-map (sb!c::compiled-debug-info-fun-map info))
             (len (length fun-map)))
        (declare (type simple-vector fun-map))
        (if (= len 1)
 ;;; Return the name of the function represented by DEBUG-FUN. This may
 ;;; be a string or a cons; do not assume it is a symbol.
 (defun debug-fun-name (debug-fun)
+  (declare (type debug-fun debug-fun))
   (etypecase debug-fun
     (compiled-debug-fun
      (sb!c::compiled-debug-fun-name
                     (and (sb!c::compiled-debug-fun-p x)
                          (eq (sb!c::compiled-debug-fun-name x) name)
                          (eq (sb!c::compiled-debug-fun-kind x) nil)))
-                  (get-debug-info-fun-map
+                  (sb!c::compiled-debug-info-fun-map
                    (%code-debug-info component)))))
        (if res
            (make-compiled-debug-fun res component)
                                                         save-sc-offset)
                                buffer)))))))
 \f
-;;;; unpacking minimal debug functions
-
-;;; Return a FUN-MAP for a given COMPILED-DEBUG-INFO object.
-(defun get-debug-info-fun-map (info)
-  (declare (type sb!c::compiled-debug-info info))
-  (let ((map (sb!c::compiled-debug-info-fun-map info)))
-    ;; The old CMU CL had various hairy possibilities here, but in
-    ;; SBCL we only use this one, right? 
-    (aver (simple-vector-p map))
-    ;; So it's easy..
-    map))
-\f
 ;;;; CODE-LOCATIONs
 
 ;;; If we're sure of whether code-location is known, return T or NIL.
        ;; interpreter.)
        ))
     ;; (There used to be more cases back before sbcl-0.7.0,,
-    ;; when we did special tricks to debug the IR1
-    ;; interpreter.)
+    ;; when we did special tricks to debug IR1-interpreted code.)
     ))
 (defun sub-compiled-code-location= (obj1 obj2)
   (= (compiled-code-location-pc obj1)
 ;;; returns the overwritten bits. You must call this in a context in
 ;;; which GC is disabled, so that Lisp doesn't move objects around
 ;;; that C is pointing to.
-(sb!alien:def-alien-routine "breakpoint_install" sb!c-call:unsigned-long
+(sb!alien:define-alien-routine "breakpoint_install" sb!c-call:unsigned-long
   (code-obj sb!c-call:unsigned-long)
   (pc-offset sb!c-call:int))
 
 ;;; This removes the break instruction and replaces the original
 ;;; instruction. You must call this in a context in which GC is disabled
 ;;; so Lisp doesn't move objects around that C is pointing to.
-(sb!alien:def-alien-routine "breakpoint_remove" sb!c-call:void
+(sb!alien:define-alien-routine "breakpoint_remove" sb!c-call:void
   (code-obj sb!c-call:unsigned-long)
   (pc-offset sb!c-call:int)
   (old-inst sb!c-call:unsigned-long))
 
-(sb!alien:def-alien-routine "breakpoint_do_displaced_inst" sb!c-call:void
+(sb!alien:define-alien-routine "breakpoint_do_displaced_inst" sb!c-call:void
   (scp (* os-context-t))
   (orig-inst sb!c-call:unsigned-long))