Index: /trunk/ccl/lib/x86-backtrace.lisp
===================================================================
--- /trunk/ccl/lib/x86-backtrace.lisp	(revision 6919)
+++ /trunk/ccl/lib/x86-backtrace.lisp	(revision 6920)
@@ -80,6 +80,17 @@
     (if (and (>= idx 0)
              (< idx raw-size))
-      (%fixnum-ref (the fixnum (1- base))
-                   (the fixnum (ash (the fixnum (- idx)) target::word-shift)))
+      (let* ((addr (- (the fixnum (1- base))
+                      idx)))
+        (multiple-value-bind (db-count first-db last-db)
+            (count-db-links-in-frame frame base context)
+          (let* ((is-db-link
+                  (unless (zerop db-count)
+                    (do* ((last last-db (previous-db-link last first-db)))
+                         ((null last))
+                      (when (= addr last)
+                        (return t))))))
+            (if is-db-link
+              (oldest-binding-frame-value context addr)
+              (%fixnum-ref addr)))))
       bad)))
 
@@ -118,24 +129,27 @@
   (let* ((last-catch (last-catch-since cfp context))
          (index (register-number->saved-register-index regval)))
-    (or
-     (do* ((frame cfp (child-frame frame context))
-           (first t))
-          ((null frame))
-       (if (xcf-p frame)
-         (with-macptrs (xp)
-           (%setf-macptr-to-object xp (%fixnum-ref frame x8664::xcf.xp))
-           (return (encoded-gpr-lisp xp regval)))
-         (progn
-           (unless first
-             (multiple-value-bind (lfun pc)
-                 (cfp-lfun frame)
-               (when lfun
-                 (multiple-value-bind (mask where)
-                     (registers-used-by lfun pc)
-                   (when (if mask (logbitp index mask))
-                     (incf where (logcount (logandc2 mask (1- (ash 1 (1+ index))))))
-                     (return (raw-frame-ref frame context where bad)))))))
-           (setq first nil))))
-     (get-register-value nil last-catch index))))
+    (do* ((frame cfp (child-frame frame context))
+          (first t))
+         ((null frame))
+      (if (xcf-p frame)
+        (with-macptrs (xp)
+          (%setf-macptr-to-object xp (%fixnum-ref frame x8664::xcf.xp))
+          (return-from %find-register-argument-value
+            (encoded-gpr-lisp xp regval)))
+        (progn
+          (unless first
+            (multiple-value-bind (lfun pc)
+                (cfp-lfun frame)
+              (when lfun
+                (multiple-value-bind (mask where)
+                    (registers-used-by lfun pc)
+                  (when (if mask (logbitp index mask))
+                    (incf where (logcount (logandc2 mask (1- (ash 1 (1+ index))))))
+
+
+                    (return-from %find-register-argument-value
+                      (raw-frame-ref frame context where bad)))))))
+          (setq first nil))))
+    (get-register-value nil last-catch index)))
 
 ;;; Used for printing only.
