Changeset 12067


Ignore:
Timestamp:
May 15, 2009, 2:25:52 PM (10 years ago)
Author:
gz
Message:

Better fix for bug #474: make %find-register-argument-value stop searching when it gets mask/nil from registers-used-by, since that means all bets are off. Make register-used-by return nil/nil when pc is before register usage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lib/x86-backtrace.lisp

    r12066 r12067  
    3030  (multiple-value-bind (mask stack-location rpc)
    3131      (%function-register-usage function)
    32     (if (null mask)
     32    (if (or (null mask)
     33            (and at-pc rpc (<= at-pc rpc)))
    3334      (values nil nil)
    34       (values (canonicalize-register-mask mask) (if (and at-pc rpc (> at-pc rpc)) stack-location)))))
     35      (values (canonicalize-register-mask mask) (if (and at-pc rpc) stack-location)))))
    3536
    3637(defun canonicalize-register-mask (mask)
     
    175176                (multiple-value-bind (mask where)
    176177                    (registers-used-by lfun pc)
    177                   (when (if where (logbitp index mask))
    178                     (incf where (logcount (logandc2 mask (1- (ash 1 (1+ index))))))
     178                  (when (if mask (logbitp index mask))
    179179                    (return-from %find-register-argument-value
    180                       (raw-frame-ref frame context where bad)))))))
     180                      (if where
     181                        (let ((offset (logcount (logandc2 mask (1- (ash 1 (1+ index)))))))
     182                          (raw-frame-ref frame context (+ where offset) bad))
     183                        bad)))))))
    181184          (setq first nil))))
    182185    (get-register-value nil last-catch index)))
Note: See TracChangeset for help on using the changeset viewer.