📄 cflow.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>cflow</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_000_324"> </a>NAME</h4><blockquote>cflow - generate a C-language flowgraph (<b>DEVELOPMENT</b>)</blockquote><h4><a name = "tag_000_000_325"> </a>SYNOPSIS</h4><blockquote><pre><code>cflow <b>[</b>r<b>][</b>-d <i>num</i><b>][</b>-D <i>name</i><b>[</b>=<i>def</i><b>]]</b> ... <b>[</b>-i <i>incl</i><b>][</b>-I <i>dir</i><b>]</b> ... <b>[</b>-U <i>dir</i><b>]</b> ...<i>file</i> ... </code></pre></blockquote><h4><a name = "tag_000_000_326"> </a>DESCRIPTION</h4><blockquote>The<i>cflow</i>utilityanalyses a collection ofobject files or assembler,C-language,<i><a href="lex.html">lex</a></i>or<i><a href="yacc.html">yacc</a></i>source files,and attempts to build a graph,written to standard output,charting the external references.</blockquote><h4><a name = "tag_000_000_327"> </a>OPTIONS</h4><blockquote>The<i>cflow</i>utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b> </a> ,except that the order of the<b>-D</b>,<b>-I</b>and<b>-U</b>options (which are identical to their interpretation by<i><a href="c89.html">c89</a></i>)is significant.The following options are supported:<dl compact><dt><b>-d </b><i>num</i><dd>Indicate the depth at which the flowgraphis cut off.The argument<i>num</i>is a decimal integer.By default this is a very large number(typically greater than 32000).Attempts to setthe cut-off depth to a non-positive integer will be ignored.<dt><b>-i </b><i>incl</i><dd>Increase the number of included symbols.The<i>incl</i>option-argument is one of the following characters:<dl compact><dt><b>x</b><dd>Include external and static data symbols.The default is to includeonly functions in the flowgraph.<dt><b>_</b><dd>(Underscore)Include names that begin with an underscore.The default is to excludethese functions (and data if<b>-i</b>xis used).</dl><br><dt><b>-r</b><dd>Reverse the caller:callee relationship,producing an inverted listingshowing the callers of each function.The listing is also sorted inlexicographical order by callee.<p></dl></blockquote><h4><a name = "tag_000_000_328"> </a>OPERANDS</h4><blockquote>The following operand is supported:<dl compact><dt><i>file</i><dd>The pathname of a file for which a graph is to be generated.Files suffixed in<b>.l</b>,<b>.y</b>,<b>.c</b>and<b>.i</b>are processed by<i><a href="lex.html">lex</a></i>and<i><a href="yacc.html">yacc</a></i>and preprocessed by the<i><a href="c89.html">c89</a></i>preprocessor phase(bypassed for<b>.i</b>files) as appropriate,and then run through the first pass of<i><a href="lint.html">lint</a></i>.Files suffixed with<b>.s</b>are assembled and informationis extracted (as in<b>.o</b>files)from the symbol table.</dl></blockquote><h4><a name = "tag_000_000_329"> </a>STDIN</h4><blockquote>Not used.</blockquote><h4><a name = "tag_000_000_330"> </a>INPUT FILES</h4><blockquote>The input files are object files or assembler,C-language,<i><a href="lex.html">lex</a></i>or<i><a href="yacc.html">yacc</a></i>source files.</blockquote><h4><a name = "tag_000_000_331"> </a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>cflow</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_COLLATE</i><dd>Determine the locale for theordering of the output when the<b>-r</b>option is used.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments and input files).<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_000_000_332"> </a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_000_000_333"> </a>STDOUT</h4><blockquote>The flowgraph written to standard output is formatted as follows:<p><code><tt>"%d %s:%s\n"</tt>, <<i>reference number</i>>,<<i>global</i>>,<<i>definition</i>></code><p>Each line of output begins with a reference(that is, line)number, followed by a suitable amount of indentationindicating the level.This is followed by the name of the global,a colon and its definition.Normally globals are only functions not defined as an external orbeginning with an underscore; see the OPTIONS section for the<b>-i</b>inclusion option.For information extracted from C-language source,the definition consists of an abstract type declaration(for example,<b>char</b>*) and, delimited by angle brackets,the name of the source fileand the line numberwhere the definition was found.Definitions extracted from object filesindicate the filename and locationcounter under which the symbol appeared(for example,<i>text</i>).<p>Once a definition of a name has been written,subsequent references to that name containonly the reference number of the linewhere the definition can be found.For undefined references, only<i><></i>is written.</blockquote><h4><a name = "tag_000_000_334"> </a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_000_000_335"> </a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_000_336"> </a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_000_000_337"> </a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>Successful completion.<dt>>0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_000_000_338"> </a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.</blockquote><h4><a name = "tag_000_000_339"> </a>APPLICATION USAGE</h4><blockquote>Files produced by<i><a href="lex.html">lex</a></i>and<i><a href="yacc.html">yacc</a></i>cause the reordering of line number declarations, and this canconfuse<i>cflow</i>.To obtain proper results, the input of<i><a href="yacc.html">yacc</a></i>or<i><a href="lex.html">lex</a></i>must be directed to<i>cflow</i>.<br></blockquote><h4><a name = "tag_000_000_340"> </a>EXAMPLES</h4><blockquote>Given the following in<b>file.c</b>:<pre><code>int i;main(){ f(); g(); f();}f(){ i = h();}</code></pre>The command:<pre><code>cflow -i x file.c</code></pre>produces the output:<pre><code>1 main: int(), <file.c 4>2 f: int(), <file.c 11>3 h: <>4 i: int, <file.c 1>5 g: <></code></pre></blockquote><h4><a name = "tag_000_000_341"> </a>FUTURE DIRECTIONS</h4><blockquote>None.<br></blockquote><h4><a name = "tag_000_000_342"> </a>SEE ALSO</h4><blockquote><i><a href="cc.html">cc</a></i>,<i><a href="c89.html">c89</a></i>,<i><a href="lex.html">lex</a></i>,<i><a href="yacc.html">yacc</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -