Commit 0201bb51 authored by Frode Vatvedt Fjeld's avatar Frode Vatvedt Fjeld

Minor hacking on backtrace.

parent 8d2da930
......@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
;;;; Created at: Fri Aug 24 11:39:37 2001
;;;;
;;;; $Id: procfs-image.lisp,v 1.8 2004/06/29 23:15:47 ffjeld Exp $
;;;; $Id: procfs-image.lisp,v 1.9 2004/07/08 18:53:33 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -169,7 +169,8 @@
(- 5 (position name
'(nil :eflags :eip :error-code :exception :ebp nil
:ecx :eax :edx :ebx :esi :edi))))
(defun backtrace ()
(defun backtrace (&key reqs)
(format t "~&Backtracing from EIP = #x~X: "
(image-register32 *image* :eip))
;; (search-image-funobj (image-register32 *image* :eip))
......@@ -197,7 +198,11 @@
(write-string (symbol-name name))
(when (string= name 'toplevel-function)
(loop-finish))
(format t " (#x~X)" (stack-frame-return-address stack-frame))))
(format t " (#x~X)" (stack-frame-return-address stack-frame))
(when reqs
(format t " req1: ~S, req2: ~S"
(movitz-word (get-word stack-frame -2))
(movitz-word (get-word stack-frame -3))))))
(t (write (movitz-print movitz-name)))))
do (format t "~& => "))
(values))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment