[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

function callees



    Is there anyway to generate a call tree (graph) for a function?

This is not exactly what you want, but is a possible starting point:

(cp:define-command (com-D,#TD1PsT[Begin using 006 escapes](1 0 (NIL 0) (NIL :BOLD NIL) "CPTFONTCB")Show-Function-Callees
0		     :command-table "User")
    ((function 'dbg:compiled-function-spec :default nil))
   (let ((table (make-hash-table)))
     (si:map-over-compiled-function-callees
       (fdefinition function)
       #'(lambda (ignore callee how) (pushnew callee (gethash how table)))
       :external-references t
       :debugging-info t)
     (loop for entry being the hash-elements of table with-key how
	   do (format t "~%~'b~A~:~{~%  ~S~}" how entry))))

John Krieger (s9274@srl1.lanl.gov)
Westinghouse Savannah River Company