logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

cflow.1p (7230B)


  1. '\" et
  2. .TH CFLOW "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. cflow
  12. \(em generate a C-language flowgraph (\fBDEVELOPMENT\fP)
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. cflow \fB[\fR-r\fB] [\fR-d \fInum\fB] [\fR-D \fIname\fB[\fR=\fIdef\fB]]\fR...\fB [\fR-i \fIincl\fB] [\fR-I \fIdir\fB]\fR...
  17. \fB[\fR-U \fIdir\fB]\fR... \fIfile\fR...
  18. .fi
  19. .SH DESCRIPTION
  20. The
  21. .IR cflow
  22. utility shall analyze a collection of object files or assembler,
  23. C-language,
  24. .IR lex ,
  25. or
  26. .IR yacc
  27. source files, and attempt to build a graph, written to standard output,
  28. charting the external references.
  29. .SH OPTIONS
  30. The
  31. .IR cflow
  32. utility shall conform to the Base Definitions volume of POSIX.1\(hy2017,
  33. .IR "Section 12.2" ", " "Utility Syntax Guidelines",
  34. except that the order of the
  35. .BR \-D ,
  36. .BR \-I ,
  37. and
  38. .BR \-U
  39. options (which are identical to their interpretation by
  40. .IR c99 )
  41. is significant.
  42. .P
  43. The following options shall be supported:
  44. .IP "\fB\-d\ \fInum\fR" 10
  45. Indicate the depth at which the flowgraph is cut off. The application
  46. shall ensure that the argument
  47. .IR num
  48. is a decimal integer. By default this is a very large number
  49. (typically greater than 32\|000). Attempts to set the cut-off depth to
  50. a non-positive integer shall be ignored.
  51. .IP "\fB\-i\ \fIincl\fR" 10
  52. Increase the number of included symbols. The
  53. .IR incl
  54. option-argument is one of the following characters:
  55. .RS 10
  56. .IP "\fIx\fP" 6
  57. Include external and static data symbols. The default shall be to
  58. include only functions in the flowgraph.
  59. .IP "\fR_\fP" 6
  60. (Underscore) Include names that begin with an
  61. <underscore>.
  62. The default shall be to exclude these functions (and data if
  63. .BR "\-i\ x"
  64. is used).
  65. .RE
  66. .IP "\fB\-r\fP" 10
  67. Reverse the caller:callee relationship, producing an inverted listing
  68. showing the callers of each function. The listing shall also be sorted
  69. in lexicographical order by callee.
  70. .SH OPERANDS
  71. The following operand is supported:
  72. .IP "\fIfile\fR" 10
  73. The pathname of a file for which a graph is to be generated.
  74. Filenames suffixed by
  75. .BR .l
  76. shall shall be taken to be
  77. .IR lex
  78. input,
  79. .BR .y
  80. as
  81. .IR yacc
  82. input,
  83. .BR .c
  84. as
  85. .IR c99
  86. input, and
  87. .BR .i
  88. as the output of
  89. .IR c99
  90. .BR \-E .
  91. Such files shall be processed as appropriate, determined by their
  92. suffix.
  93. .RS 10
  94. .P
  95. Files suffixed by
  96. .BR .s
  97. (conventionally assembler source) may have more limited information
  98. extracted from them.
  99. .RE
  100. .SH STDIN
  101. Not used.
  102. .SH "INPUT FILES"
  103. The input files shall be object files or assembler, C-language,
  104. .IR lex ,
  105. or
  106. .IR yacc
  107. source files.
  108. .SH "ENVIRONMENT VARIABLES"
  109. The following environment variables shall affect the execution of
  110. .IR cflow :
  111. .IP "\fILANG\fP" 10
  112. Provide a default value for the internationalization variables that are
  113. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  114. .IR "Section 8.2" ", " "Internationalization Variables"
  115. for the precedence of internationalization variables used to determine
  116. the values of locale categories.)
  117. .IP "\fILC_ALL\fP" 10
  118. If set to a non-empty string value, override the values of all the
  119. other internationalization variables.
  120. .IP "\fILC_COLLATE\fP" 10
  121. .br
  122. Determine the locale for the ordering of the output when the
  123. .BR \-r
  124. option is used.
  125. .IP "\fILC_CTYPE\fP" 10
  126. Determine the locale for the interpretation of sequences of bytes of
  127. text data as characters (for example, single-byte as opposed to
  128. multi-byte characters in arguments and input files).
  129. .IP "\fILC_MESSAGES\fP" 10
  130. .br
  131. Determine the locale that should be used to affect the format and
  132. contents of diagnostic messages written to standard error.
  133. .IP "\fINLSPATH\fP" 10
  134. Determine the location of message catalogs for the processing of
  135. .IR LC_MESSAGES .
  136. .SH "ASYNCHRONOUS EVENTS"
  137. Default.
  138. .SH STDOUT
  139. The flowgraph written to standard output shall be formatted as follows:
  140. .sp
  141. .RS 4
  142. .nf
  143. "%d %s:%s\en", <\fIreference number\fR>, <\fIglobal\fR>, <\fIdefinition\fR>
  144. .fi
  145. .P
  146. .RE
  147. .P
  148. Each line of output begins with a reference (that is, line) number,
  149. followed by indentation of at least one column position per level.
  150. This is followed by the name of the global, a
  151. <colon>,
  152. and its definition. Normally globals are only functions not defined as
  153. an external or beginning with an
  154. <underscore>;
  155. see the OPTIONS section for the
  156. .BR \-i
  157. inclusion option. For information extracted from C-language source, the
  158. definition consists of an abstract type declaration (for example,
  159. .BR "char *" )
  160. and, delimited by angle brackets, the name of the source file and the
  161. line number where the definition was found. Definitions extracted from
  162. object files indicate the filename and location counter under which
  163. the symbol appeared (for example,
  164. .IR text ).
  165. .P
  166. Once a definition of a name has been written, subsequent references to
  167. that name contain only the reference number of the line where the
  168. definition can be found. For undefined references, only
  169. .BR \(dq<\|>\(dq
  170. shall be written.
  171. .SH STDERR
  172. The standard error shall be used only for diagnostic messages.
  173. .SH "OUTPUT FILES"
  174. None.
  175. .SH "EXTENDED DESCRIPTION"
  176. None.
  177. .SH "EXIT STATUS"
  178. The following exit values shall be returned:
  179. .IP "\00" 6
  180. Successful completion.
  181. .IP >0 6
  182. An error occurred.
  183. .SH "CONSEQUENCES OF ERRORS"
  184. Default.
  185. .LP
  186. .IR "The following sections are informative."
  187. .SH "APPLICATION USAGE"
  188. Files produced by
  189. .IR lex
  190. and
  191. .IR yacc
  192. cause the reordering of line number declarations, and this can confuse
  193. .IR cflow .
  194. To obtain proper results, the input of
  195. .IR yacc
  196. or
  197. .IR lex
  198. must be directed to
  199. .IR cflow .
  200. .SH EXAMPLES
  201. Given the following in
  202. .BR file.c :
  203. .sp
  204. .RS 4
  205. .nf
  206. int i;
  207. int f();
  208. int g();
  209. int h();
  210. int
  211. main()
  212. {
  213. f();
  214. g();
  215. f();
  216. }
  217. int
  218. f()
  219. {
  220. i = h();
  221. }
  222. .fi
  223. .P
  224. .RE
  225. .P
  226. The command:
  227. .sp
  228. .RS 4
  229. .nf
  230. cflow -i x file.c
  231. .fi
  232. .P
  233. .RE
  234. .P
  235. produces the output:
  236. .sp
  237. .RS 4
  238. .nf
  239. 1 main: int(), <file.c 6>
  240. 2 f: int(), <file.c 13>
  241. 3 h: <>
  242. 4 i: int, <file.c 1>
  243. 5 g: <>
  244. .fi
  245. .P
  246. .RE
  247. .SH RATIONALE
  248. None.
  249. .SH "FUTURE DIRECTIONS"
  250. None.
  251. .SH "SEE ALSO"
  252. .IR "\fIc99\fR\^",
  253. .IR "\fIlex\fR\^",
  254. .IR "\fIyacc\fR\^"
  255. .P
  256. The Base Definitions volume of POSIX.1\(hy2017,
  257. .IR "Chapter 8" ", " "Environment Variables",
  258. .IR "Section 12.2" ", " "Utility Syntax Guidelines"
  259. .\"
  260. .SH COPYRIGHT
  261. Portions of this text are reprinted and reproduced in electronic form
  262. from IEEE Std 1003.1-2017, Standard for Information Technology
  263. -- Portable Operating System Interface (POSIX), The Open Group Base
  264. Specifications Issue 7, 2018 Edition,
  265. Copyright (C) 2018 by the Institute of
  266. Electrical and Electronics Engineers, Inc and The Open Group.
  267. In the event of any discrepancy between this version and the original IEEE and
  268. The Open Group Standard, the original IEEE and The Open Group Standard
  269. is the referee document. The original Standard can be obtained online at
  270. http://www.opengroup.org/unix/online.html .
  271. .PP
  272. Any typographical or formatting errors that appear
  273. in this page are most likely
  274. to have been introduced during the conversion of the source files to
  275. man page format. To report such errors, see
  276. https://www.kernel.org/doc/man-pages/reporting_bugs.html .