Changeset 13918
- Timestamp:
- Jul 3, 2010, 6:22:01 AM (14 years ago)
- Location:
- branches/arm
- Files:
-
- 2 edited
-
level-1/arm-threads-utils.lisp (modified) (3 diffs)
-
lib/arm-backtrace.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/arm/level-1/arm-threads-utils.lisp
r13889 r13918 20 20 (cond ((fake-stack-frame-p p) 21 21 (%fake-stack-frame.next-sp p)) 22 ((fixnump p) 23 (let ((backlink (%%frame-backlink p)) 24 (fake-frame 25 (if context (bt.fake-frames context) *fake-stack-frames*))) 26 (loop 27 (when (null fake-frame) (return backlink)) 28 (when (eq backlink (%fake-stack-frame.sp fake-frame)) 29 (return fake-frame)) 30 (setq fake-frame (%fake-stack-frame.link fake-frame))))) 22 ((fixnump p) (%%frame-backlink p)) 31 23 (t (error "~s is not a valid stack frame" p)))) 32 24 … … 35 27 36 28 (defun catch-frame-sp (catch) 37 (declare (ignorable catch)) 38 ) 29 (+ (strip-tag-to-fixnum catch) ;catch frame is stack-consed 30 arm::catch-frame.element-count)) 31 32 (defun fake-stack-frame-p (x) 33 nil) 39 34 40 35 (defun bottom-of-stack-p (p context) … … 46 41 47 42 (defun lisp-frame-p (p context) 48 (or (fake-stack-frame-p p) 49 (locally (declare (fixnum p)) 50 (let ((next-frame (%frame-backlink p context))) 51 (when (fake-stack-frame-p next-frame) 52 (setq next-frame (%fake-stack-frame.sp next-frame))) 53 (locally (declare (fixnum next-frame)) 54 (if (bottom-of-stack-p next-frame context) 55 (values nil t) 56 (and 57 (eql (ash target::lisp-frame.size (- target::fixnum-shift)) 58 (the fixnum (- next-frame p))) 59 ;; EABI C functions keep their saved LRs where we save FN or 0 60 ;; The saved LR of such a function would be fixnum-tagged and never 0. 61 (let* ((fn (%fixnum-ref p target::lisp-frame.savefn))) 62 (or (eql fn 0) (typep fn 'function)))))))))) 43 (if (bottom-of-stack-p p context) 44 (values nil t) 45 (values (or (fake-stack-frame-p p) 46 (eql (%fixnum-ref-natural p) arm::lisp-frame-marker)) nil))) 63 47 64 48 -
branches/arm/lib/arm-backtrace.lisp
r13778 r13918 16 16 17 17 (in-package "CCL") 18 19 (defun cfp-lfun (p) 20 (if (and (typep p 'fixnum) 21 (lisp-frame-p p nil)) 22 (%cfp-lfun p))) 23 24 (defun catch-csp-p (p context) 25 (let ((catch (if context 26 (bt.top-catch context) 27 (%catch-top (%current-tcr))))) 28 (loop 29 (when (null catch) (return nil)) 30 (let ((sp (catch-frame-sp catch))) 31 (when (eql sp p) 32 (return t))) 33 (setq catch (next-catch catch)))))
Note:
See TracChangeset
for help on using the changeset viewer.
