01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CFLOW {l) CFLOW (l)<br />

NAME<br />

cfiow - generate C flow graph<br />

SYNOPSIS<br />

cftow [-r] [ -ix] [-i_] [-dnum] files<br />

DESCRIPTION<br />

Cftow analyzes a collection of C, YACC, LEX, assembler, and<br />

object files and attempts to build a graph charting the external<br />

references. Files suffixed in .y , .I, .c, and .i are YACC'd, LEX'd,<br />

and C-preprocessed (bypassed for .i files) as appropriate and then<br />

run through the first pass of lint(l). (The -1, -D, and -U<br />

options of the C-preprocessor are also understood.) Files suffixed<br />

with .s are assembled and information is extracted (as in .o files)<br />

from the symbol table. The output of all this non-trivial processing<br />

is collected and turned into a graph of external references<br />

which is displayed upon the standard output.<br />

Each line of output begins with a reference (i.e., line) number, followed<br />

by a suitable number of tabs indicating the level. Then the<br />

name of the global (normally only a function not defined as an<br />

external or beginning with an underscore; see below for the -i<br />

inclusion option) a colon and its definition. For information<br />

extracted from C source, the definition consists of an abstract type<br />

declaration (e.g., char * ), and, delimited by angle brackets, the<br />

name of the source file and the line number where the definition<br />

was found. Definitions extracted from object files indicate the file<br />

name and location counter under which the symbol appeared (e.g.,<br />

text). Leading underscores in C-style external names are deleted.<br />

Once a definition of a name has been printed, subsequent references<br />

to that name contain only the reference number of the line<br />

where the definition may be found. For undefined references, only<br />

< > is printed.<br />

As an example, given the following in file.c:<br />

int<br />

main()<br />

{<br />

}<br />

f()<br />

{<br />

}<br />

the command<br />

i· I<br />

f();<br />

g();<br />

f{);<br />

cfiow file.c<br />

i=h();<br />

- 1-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!