Commit 9943ee51 authored by Juho Snellman's avatar Juho Snellman
Browse files

0.9.16.43:

        Switch to using the more accurate method of determining
        *STEP-FRAME* on x86/x86-64 where SIGNAL-CONTEXT-FRAME works.
        Retain the previous kludge on non-x86, where SIGNAL-CONTEXT-FRAME
        seems to be completely broken.
parent 631ecfcd
Loading
Loading
Loading
Loading
+15 −10
Original line number Original line Diff line number Diff line
@@ -3332,16 +3332,21 @@ register."
    ;; If there was not enough debug information available, there's no
    ;; If there was not enough debug information available, there's no
    ;; sense in signaling the condition.
    ;; sense in signaling the condition.
    (when step-info
    (when step-info
      (let ((*step-frame* (frame-down (top-frame))))
      (let ((*step-frame*
             #+(or x86 x86-64)
             (signal-context-frame (sb!alien::alien-sap context))
             #-(or x86 x86-64)
             ;; KLUDGE: Use the first non-foreign frame as the
             ;; KLUDGE: Use the first non-foreign frame as the
        ;; *STACK-TOP-HINT*. Getting the frame from the signal context
             ;; *STACK-TOP-HINT*. Getting the frame from the signal
        ;; would be cleaner, but SIGNAL-CONTEXT-FRAME doesn't seem
             ;; context as on x86 would be cleaner, but
        ;; seem to work very well currently.
             ;; SIGNAL-CONTEXT-FRAME doesn't seem seem to work at all
        (loop while *step-frame*
             ;; on non-x86.
             (loop with frame = (frame-down (top-frame))
                   while frame
                   for dfun = (frame-debug-fun *step-frame*)
                   for dfun = (frame-debug-fun *step-frame*)
                   do (when (typep dfun 'compiled-debug-fun)
                   do (when (typep dfun 'compiled-debug-fun)
                   (return))
                        (return frame))
              do (setf *step-frame* (frame-down *step-frame*)))
                   do (setf *step-frame* (frame-down *step-frame*)))))
        (sb!impl::step-form step-info
        (sb!impl::step-form step-info
                            ;; We could theoretically store information in
                            ;; We could theoretically store information in
                            ;; the debug-info about to determine the
                            ;; the debug-info about to determine the
+30 −17
Original line number Original line Diff line number Diff line
@@ -149,7 +149,8 @@
                                     (dfun (sb-di::frame-debug-fun frame))
                                     (dfun (sb-di::frame-debug-fun frame))
                                     (name (sb-di::debug-fun-name dfun)))
                                     (name (sb-di::debug-fun-name dfun)))
                                (assert (equal name 'fib))
                                (assert (equal name 'fib))
                                (incf count)))))))
                                (incf count)
                                (invoke-restart 'step-next)))))))
    (step (fib 3))
    (step (fib 3))
    (assert (= count 6))))
    (assert (= count 6))))


@@ -161,20 +162,32 @@
                                (backtrace)))))))
                                (backtrace)))))))
    (step (fib 3))))
    (step (fib 3))))


(with-test (:name :step-into)
  (handler-bind ((step-condition (lambda (c)
  (handler-bind ((step-condition (lambda (c)
                                   (funcall *stepper-hook* c))))
                                   (funcall *stepper-hook* c))))
  (with-test (:name :step-into)
    (test-step-into)))
    (test-step-into))

(with-test (:name :step-next)
(with-test (:name :step-next)
    (test-step-next))
  (handler-bind ((step-condition (lambda (c)
                                   (funcall *stepper-hook* c))))
      (test-step-next)))

(with-test (:name :step-out)
(with-test (:name :step-out)
    (test-step-out))
  (handler-bind ((step-condition (lambda (c)
                                   (funcall *stepper-hook* c))))
    (test-step-out)))

(with-test (:name :step-start-from-break)
(with-test (:name :step-start-from-break)
    (test-step-start-from-break))
  (handler-bind ((step-condition (lambda (c)
                                   (funcall *stepper-hook* c))))
    (test-step-start-from-break)))

(with-test (:name :step-frame)
(with-test (:name :step-frame)
    (test-step-frame))
  (handler-bind ((step-condition (lambda (c)
                                   (funcall *stepper-hook* c))))
    (test-step-frame)))

(with-test (:name :step-backtrace)
(with-test (:name :step-backtrace)
  (handler-bind ((step-condition (lambda (c)
                                   (funcall *stepper-hook* c))))
    (test-step-backtrace)))
    (test-step-backtrace)))


+1 −1
Original line number Original line Diff line number Diff line
@@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"0.9.16.42"
"0.9.16.43"