calls – print static call graph of a C program|
calls [ –ptv ] [ –f function ] [ –w width ... ] [ –D def ] [ –U def
] [ –I dir ] [ file ... ]|
Calls reads files, which should be the source of C programs, and
writes the analysed calling pattern to standard output. If no
file names are given, standard input will be read. Calls is intended
to help analyse the flow of a program by laying out the functions
called in the hierarchical manner used in Software Tools by B.
Kernighan and P. Plauger. |
All input is first filtered through cpp(1). Functions called but not defined within the source files are shown as:
–f Add function as a root of a call graph to be printed.
–p Make cpp search the APE include directories.
–t Provides a terse form of output, in which the calling pattern for any function is printed only once on the first occurrence of the function. Subsequent occurrences output the function name and a notation
–wn Set the output width to n. The default is 80 columns.
–Idir Change the algorithm for searching for #include files whose names do not begin with / to look in dir before looking in the directories on the standard list.
What does cat call?|
Generate the PC kernel's internal call graph.
Forward declared functions defined within a function body which
are not subsequently used within that function body will be listed
as having been called. |
Does not understand calls through function pointers.
Does not understand the restricted scope of static functions.