From: Juho S. <js...@us...> - 2006-09-20 15:04:51
|
Update of /cvsroot/sbcl/sbcl/src/code In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14394/src/code Modified Files: debug-int.lisp Log Message: 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. Index: debug-int.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/code/debug-int.lisp,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- debug-int.lisp 18 Sep 2006 20:09:13 -0000 1.103 +++ debug-int.lisp 20 Sep 2006 15:04:48 -0000 1.104 @@ -3332,16 +3332,21 @@ ;; If there was not enough debug information available, there's no ;; sense in signaling the condition. (when step-info - (let ((*step-frame* (frame-down (top-frame)))) - ;; KLUDGE: Use the first non-foreign frame as the - ;; *STACK-TOP-HINT*. Getting the frame from the signal context - ;; would be cleaner, but SIGNAL-CONTEXT-FRAME doesn't seem - ;; seem to work very well currently. - (loop while *step-frame* - for dfun = (frame-debug-fun *step-frame*) - do (when (typep dfun 'compiled-debug-fun) - (return)) - do (setf *step-frame* (frame-down *step-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 + ;; *STACK-TOP-HINT*. Getting the frame from the signal + ;; context as on x86 would be cleaner, but + ;; SIGNAL-CONTEXT-FRAME doesn't seem seem to work at all + ;; on non-x86. + (loop with frame = (frame-down (top-frame)) + while frame + for dfun = (frame-debug-fun *step-frame*) + do (when (typep dfun 'compiled-debug-fun) + (return frame)) + do (setf *step-frame* (frame-down *step-frame*))))) (sb!impl::step-form step-info ;; We could theoretically store information in ;; the debug-info about to determine the |