Update of /project/movitz/cvsroot/movitz/losp/x86-pc In directory common-lisp.net:/tmp/cvs-serv19160
Modified Files: debugger.lisp Log Message: Tweaked stack-frame-numargs to be slightly more clever.
Date: Wed Feb 2 08:51:26 2005 Author: ffjeld
Index: movitz/losp/x86-pc/debugger.lisp diff -u movitz/losp/x86-pc/debugger.lisp:1.30 movitz/losp/x86-pc/debugger.lisp:1.31 --- movitz/losp/x86-pc/debugger.lisp:1.30 Thu Jan 27 12:19:53 2005 +++ movitz/losp/x86-pc/debugger.lisp Wed Feb 2 08:51:26 2005 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Fri Nov 22 10:09:18 2002 ;;;; -;;;; $Id: debugger.lisp,v 1.30 2005/01/27 11:19:53 ffjeld Exp $ +;;;; $Id: debugger.lisp,v 1.31 2005/02/02 07:51:26 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -144,12 +144,17 @@ ((integerp (car map)) (car map)) ((eq :ecx (car map)) - (cond - ((= #xb1 (aref code (- call-site 5))) - ;; Assume it's a (:movb x :cl) instruction - (aref code (- call-site 4))) - (t ;; now we should search further for where ecx may be set.. - nil))))))))))) + (let ((load-ecx-index (- call-site 4))) + (loop while (and (plusp load-ecx-index) + (= #x90 (aref code load-ecx-index))) ; Skip any NOPs + do (decf load-ecx-index)) + (cond + ((= #xb1 (aref code (- load-ecx-index 1))) + ;; Assume it's a (:movb x :cl) instruction + (aref code load-ecx-index)) + (t ;; now we should search further for where ecx may be set.. + (format t "{no ECX at ~D in ~S}" call-site funobj) + nil))))))))))))
(defun signed8-index (s8) "Convert a 8-bit twos-complement signed integer bitpattern to