Changeset 10118


Ignore:
Timestamp:
Jul 19, 2008, 2:40:39 AM (11 years ago)
Author:
rme
Message:

Add x8632 support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/x86-backtrace.lisp

    r9879 r10118  
    3838
    3939(defun xcf-p (p)
    40   (eql 0 (%fixnum-ref p x8664::lisp-frame.return-address)))
     40  (eql 0 (%fixnum-ref p target::lisp-frame.return-address)))
    4141
    4242(defun %current-xcf ()
     
    4848;;; Try to determine the program counter value, relative to an xcf's nominal function.
    4949(defun pc-from-xcf (xcf)
    50   (let* ((nominal-function (%fixnum-ref xcf x8664::xcf.nominal-function))
    51          (containing-object (%fixnum-ref xcf x8664::xcf.containing-object)))
     50  (let* ((nominal-function (%fixnum-ref xcf target::xcf.nominal-function))
     51         (containing-object (%fixnum-ref xcf target::xcf.containing-object)))
    5252    (when (typep nominal-function 'function)
    5353      (if (eq containing-object (function-to-function-vector nominal-function))
    54         (- (%fixnum-ref xcf x8664::xcf.relative-pc)
    55            x8664::tag-function)
    56         (let* ((tra (%fixnum-ref xcf x8664::xcf.ra0)))
    57           (if (and (= (lisptag tra) x8664::tag-tra)
     54        (- (%fixnum-ref xcf target::xcf.relative-pc)
     55           #+x8632-target x8632::fulltag-misc
     56           #+x8664-target x8664::tag-function)
     57        (let* ((tra (%fixnum-ref xcf target::xcf.ra0)))
     58          (if (and #+x8664-target (= (lisptag tra) x8664::tag-tra)
     59                   #+x8632-target (= (fulltag tra) x8632::fulltag-tra)
    5860                   (eq nominal-function (%return-address-function tra)))
    5961            (%return-address-offset tra)))))))
     
    6264  (if (xcf-p p)
    6365    (values
    64      (%fixnum-ref p x8664::xcf.nominal-function)
     66     (%fixnum-ref p target::xcf.nominal-function)
    6567     (pc-from-xcf p))
    6668    (%cfp-lfun p)))
     
    228230  (let* ((parent (parent-frame frame context)))
    229231    (if (xcf-p frame)
    230       (values (+ frame (ash x8664::xcf.size (- x8664::word-shift)))
     232      (values (+ frame (ash target::xcf.size (- target::word-shift)))
    231233              parent)
    232       (let* ((tra (%fixnum-ref frame x8664::lisp-frame.return-address)))
     234      (let* ((tra (%fixnum-ref frame target::lisp-frame.return-address)))
    233235        (values (+ frame 2 (if (eq tra (%get-kernel-global ret1valaddr)) 1 0))
    234236                parent)))))
     
    240242    (loop
    241243      (unless catch (return last-catch))
    242       (let ((catch-fp (uvref catch target::catch-frame.rbp-cell)))
     244      (let ((catch-fp (uvref catch
     245                             #+x8632-target
     246                             x8632::catch-frame.ebp-cell
     247                             #+x8664-target
     248                             x8664::catch-frame.rbp-cell)))
    243249        (when (%stack< fp catch-fp context) (return last-catch))
    244250        (setq last-catch catch
Note: See TracChangeset for help on using the changeset viewer.