(defstruct (bogus-debug-fun
(:include debug-fun)
(:constructor make-bogus-debug-fun
- (%name &aux (%lambda-list nil) (%debug-vars nil)
- (blocks nil) (%function nil)))
+ (%name &aux
+ (%lambda-list nil)
+ (%debug-vars nil)
+ (blocks nil)
+ (%function nil)))
(:copier nil))
%name)
(defun current-fp () (current-fp))
(defun stack-ref (s n) (stack-ref s n))
(defun %set-stack-ref (s n value) (%set-stack-ref s n value))
-(defun function-code-header (fun) (function-code-header fun))
+(defun fun-code-header (fun) (fun-code-header fun))
(defun lra-code-header (lra) (lra-code-header lra))
(defun make-lisp-obj (value) (make-lisp-obj value))
(defun get-lisp-obj-address (thing) (get-lisp-obj-address thing))
-(defun function-word-offset (fun) (function-word-offset fun))
+(defun fun-word-offset (fun) (fun-word-offset fun))
#!-sb-fluid (declaim (inline cstack-pointer-valid-p))
(defun cstack-pointer-valid-p (x)
(defun component-from-component-ptr (component-ptr)
(declare (type system-area-pointer component-ptr))
(make-lisp-obj (logior (sap-int component-ptr)
- sb!vm:other-pointer-type)))
+ sb!vm:other-pointer-lowtag)))
;;;; X86 support
(code-header-len (* (get-header-data code) sb!vm:word-bytes))
(pc-offset (- (sap-int pc)
(- (get-lisp-obj-address code)
- sb!vm:other-pointer-type)
+ sb!vm:other-pointer-lowtag)
code-header-len)))
; (format t "c-lra-fpc ~A ~A ~A~%" pc code pc-offset)
(values pc-offset code)))))
(pc-offset
(- (sap-int (sb!vm:context-pc context))
(- (get-lisp-obj-address code)
- sb!vm:other-pointer-type)
+ sb!vm:other-pointer-lowtag)
code-header-len)))
(/show "got PC-OFFSET")
(unless (<= 0 pc-offset
(pc-offset
(- (sap-int (sb!vm:context-pc scp))
(- (get-lisp-obj-address code)
- sb!vm:other-pointer-type)
+ sb!vm:other-pointer-lowtag)
code-header-len)))
;; Check to see whether we were executing in a branch
;; delay slot.
(declare (type (unsigned-byte 32) bits))
(let ((object (make-lisp-obj bits)))
(if (functionp object)
- (or (function-code-header object)
+ (or (fun-code-header object)
:undefined-function)
(let ((lowtag (get-lowtag object)))
- (if (= lowtag sb!vm:other-pointer-type)
+ (if (= lowtag sb!vm:other-pointer-lowtag)
(let ((type (get-type object)))
- (cond ((= type sb!vm:code-header-type)
+ (cond ((= type sb!vm:code-header-widetag)
object)
- ((= type sb!vm:return-pc-header-type)
+ ((= type sb!vm:return-pc-header-widetag)
(lra-code-header object))
(t
nil))))))))
#!+x86
(- (sap-int ra)
(- (get-lisp-obj-address component)
- sb!vm:other-pointer-type)
+ sb!vm:other-pointer-lowtag)
(* (get-header-data component) sb!vm:word-bytes))))
(push (cons #!-x86
(stack-ref catch sb!vm:catch-block-tag-slot)
(sb!c::compiled-debug-fun-start-pc
(compiled-debug-fun-compiler-debug-fun debug-fun))))
(do ((entry (%code-entry-points component)
- (%function-next entry)))
+ (%simple-fun-next entry)))
((null entry) nil)
(when (= start-pc
(sb!c::compiled-debug-fun-start-pc
(defun fun-debug-fun (fun)
(declare (type function fun))
(ecase (get-type fun)
- (#.sb!vm:closure-header-type
- (fun-debug-fun (%closure-function fun)))
- (#.sb!vm:funcallable-instance-header-type
- (fun-debug-fun (funcallable-instance-function fun)))
- ((#.sb!vm:function-header-type #.sb!vm:closure-function-header-type)
- (let* ((name (%function-name fun))
- (component (function-code-header fun))
+ (#.sb!vm:closure-header-widetag
+ (fun-debug-fun (%closure-fun fun)))
+ (#.sb!vm:funcallable-instance-header-widetag
+ (fun-debug-fun (funcallable-instance-fun fun)))
+ ((#.sb!vm:simple-fun-header-widetag
+ #.sb!vm:closure-fun-header-widetag)
+ (let* ((name (%simple-fun-name fun))
+ (component (fun-code-header fun))
(res (find-if
(lambda (x)
(and (sb!c::compiled-debug-fun-p x)
;; works for all named functions anyway.
;; -- WHN 20000120
(debug-fun-from-pc component
- (* (- (function-word-offset fun)
+ (* (- (fun-word-offset fun)
(get-header-data component))
sb!vm:word-bytes)))))))
(zerop (logand val 3))
;; character
(and (zerop (logand val #xffff0000)) ; Top bits zero
- (= (logand val #xff) sb!vm:base-char-type)) ; Char tag
+ (= (logand val #xff) sb!vm:base-char-widetag)) ; char tag
;; unbound marker
- (= val sb!vm:unbound-marker-type)
+ (= val sb!vm:unbound-marker-widetag)
;; pointer
(and (logand val 1)
;; Check that the pointer is valid. XXX Could do a better
(sb!sys:int-sap val)))
(#.sb!vm:signed-reg-sc-number
(with-escaped-value (val)
- (if (logbitp (1- sb!vm:word-bits) val)
- (logior val (ash -1 sb!vm:word-bits))
+ (if (logbitp (1- sb!vm:n-word-bits) val)
+ (logior val (ash -1 sb!vm:n-word-bits))
val)))
(#.sb!vm:unsigned-reg-sc-number
(with-escaped-value (val)
(#.sb!vm:signed-reg-sc-number
(/show0 "case of SIGNED-REG-SC-NUMBER")
(with-escaped-value (val)
- (if (logbitp (1- sb!vm:word-bits) val)
- (logior val (ash -1 sb!vm:word-bits))
+ (if (logbitp (1- sb!vm:n-word-bits) val)
+ (logior val (ash -1 sb!vm:n-word-bits))
val)))
(#.sb!vm:unsigned-reg-sc-number
(/show0 "case of UNSIGNED-REG-SC-NUMBER")
(#.sb!vm:sap-reg-sc-number
(set-escaped-value (sap-int value)))
(#.sb!vm:signed-reg-sc-number
- (set-escaped-value (logand value (1- (ash 1 sb!vm:word-bits)))))
+ (set-escaped-value (logand value (1- (ash 1 sb!vm:n-word-bits)))))
(#.sb!vm:unsigned-reg-sc-number
(set-escaped-value value))
(#.sb!vm:non-descriptor-reg-sc-number
(#.sb!vm:sap-reg-sc-number
(set-escaped-value (sap-int value)))
(#.sb!vm:signed-reg-sc-number
- (set-escaped-value (logand value (1- (ash 1 sb!vm:word-bits)))))
+ (set-escaped-value (logand value (1- (ash 1 sb!vm:n-word-bits)))))
(#.sb!vm:unsigned-reg-sc-number
(set-escaped-value value))
(#.sb!vm:single-reg-sc-number
;;; this to determine if the value stored is the actual value or an
;;; indirection cell.
(defun indirect-value-cell-p (x)
- (and (= (get-lowtag x) sb!vm:other-pointer-type)
- (= (get-type x) sb!vm:value-cell-header-type)))
+ (and (= (get-lowtag x) sb!vm:other-pointer-lowtag)
+ (= (get-type x) sb!vm:value-cell-header-widetag)))
;;; Return three values reflecting the validity of DEBUG-VAR's value
;;; at BASIC-CODE-LOCATION:
(frame (do ((cfp (sb!vm:context-register scp sb!vm::cfp-offset))
(f (top-frame) (frame-down f)))
((= cfp (sap-int (frame-pointer f))) f)
- (declare (type (unsigned-byte #.sb!vm:word-bits) cfp))))
+ (declare (type (unsigned-byte #.sb!vm:n-word-bits) cfp))))
(component (breakpoint-data-component data))
(cookie (gethash component *fun-end-cookies*)))
(remhash component *fun-end-cookies*)
(values dst-start code-object (sap- trap-loc src-start))
#!-x86
(let ((new-lra (make-lisp-obj (+ (sap-int dst-start)
- sb!vm:other-pointer-type))))
+ sb!vm:other-pointer-lowtag))))
(set-header-data
new-lra
(logandc2 (+ sb!vm:code-constants-offset bogus-lra-constants 1)