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

code walkers or inverse who-calls



    Date: Fri, 18 Oct 1991 10:49 CDT
    From: SWM@SAPSUCKER.SCRC.Symbolics.COM (Scott McKay)

	Date: Fri, 18 Oct 1991 10:59 EDT
	From: dmitchell@trc.amoco.com (Donald H. Mitchell)

	Is there anyway to generate a call tree (graph) for a function?  I certainly
	realize that I could read through the source code and generate a database;
	however, the compiled code represents a ready database if only I could figure
	out how to access the compiled code to find all the functional objects.

    On a Genera development system?  You can use SI:MAP-OVER-COMPILED-FUNCTION-CALLEES.

    (si:map-over-compiled-function-callees
      #'sct:find-system-named
      #'(lambda (caller callee how-called)
	   (format t "~&~S ~S ~S" (sys:function-name caller) callee how-called))  
      :external-references t) 

Isn't it true that this is blind to the bodies of certain macro calls
that generate internal continuations?  Two examples that come to mind
are the bodies of GRAPHICS:With... and STATICE:With-Transaction.  While
it is true that the continuation doesn't get directly called by the
parent function that generated it (it's being passed as an arg), it
seems desirable to make that assumption.
si:map-over-compiled-function-callees doesn't seem to do that.