home *** CD-ROM | disk | FTP | other *** search
-
- CALLS
-
- calls - print out calling pattern of a C program
-
- SYNOPSIS
-
- calls [-aeitv] [-w n] [-f function] [-F function[/file.c]] [filenames]
-
- DESCRIPTION
-
- Calls is intended to help analyze the flow of a program by laying out the
- functions called in a hierarchical manner. Calls is invoked on the named C
- source files, and outputs the analyzed calling pattern to standard output.
- All filenames given will have their calling sequences combined into
- one hierarchy.
- If a filename of - is seen, standard input will be read.
-
- Functions called but not defined within the source file are shown as:
-
- function
-
- While functions defined in the source files are listed with the file they
- are declared in in brackets, as shown:
-
- function [main.c] , or
-
- function [static in main.c]
-
- or if the function is not being described
-
- function [see also %d] , or
-
- function [see below]
-
- Recursive references are shown as:
-
- function <<< recursive >>>
-
- For example, given the file prog.c
-
- main() {
- abc();
- def();
- }
- abc() {
- ghi();
- jkl();
- }
- static mno() { }
- ghi() {
- abc();
- def();
- mno();
- }
-
- Executing "calls prog.c" will produce:
-
- 1 main [prog.c]
- 2 abc [prog.c]
- 3 ghi [prog.c]
- 4 abc <<< recursive >>>
- 5 def
- 6 mno [static in prog.c]
- 7 jkl
- 8 def
-
-
- FLAGS
-
- -a Normally only the first call to a function is recorded for any
- given function, under this option all calls are recorded. This may
- make the output for some large programs very verbose and these are
- normally not needed to show the calling structure of a program.
-
- -e Normally an index listing (-i below) does not contain the external
- functions called in the program, under this option these are also
- listed. Note this option also turns on the indexing option, -i.
-
- -f function
-
- The named function will be printed as the root of a calling tree.
-
- -F function\[/file\]
-
- The named static function (in the given file) is used as the base of
- a calling tree, as above. This allows closer examination of sources
- such as that of dbx(1) that have many functions with the same name.
-
- -h Display a brief help message.
-
- -i This option produces an index of all the functions declared in the
- processed files. Optionally all functions mentioned can be output;
- see -e above.
-
- -t This option instructs calls not to display calling trees that were
- not explicitly asked for on the command line. Using this option as
- well as the index option one can produce just a list of the functions
- declared in a file.
-
- -v Be less verbose in the index output, do not output any defined
- functions that were not present in any of the output trees.
- Note this also turns on the index option.
- For a list of all functions called by 'missle' one might examine
- the index output of "calls -vt -f missle *.c".
-
- -w n
-
- Set the max indentation width to n. The default is 96 columns.
-
- BUGS
-
- Static functions must be declared (in full) before used to work properly.
-
- Output width checking is only done on the first character on a new line.
-
- AUTHOR
-
- Originally from Usenet. Major revisions by Kevin Braunsdorf, PUCC.
-
- Ported to Amiga by George MacDonald
-
-