File: cflow.txt

package info (click to toggle)
cflow 2.0-12.1
  • links: PTS
  • area: main
  • in suites: hamm, potato, slink
  • size: 128 kB
  • ctags: 163
  • sloc: ansic: 1,117; sh: 235; makefile: 102
file content (198 lines) | stat: -rw-r--r-- 5,009 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198



CFLOW(1)                                                 CFLOW(1)


NNAAMMEE
       cflow - print a function call hierarchy

SSYYNNOOPPSSIISS
       cflow [-Aagivx] [-d n] [-w n] [-r name] [cpp-opts] files

DDEESSCCRRIIPPTTIIOONN
       The  ccffllooww  command  reads  _f_i_l_e_s  as  program  source and
       attempts to print a graph of the program's  function  call
       hierarchy  to  the  standard output.  Called functions are
       indented with respect  to  their  calling  functions,  and
       printed only once, in the order they occur.

       The  first  reference to function _f_u_n_c is printed with the
       name of the file and line  number  where  it  is  defined,
       e.g.,

              func {file.c n}.

       Subsequent references are printed as:

              func ... {mm},

       where  mm is the line number in  the graph of _f_u_n_c's first
       reference.  Global variable references appear (if  invoked
       with the _-_v option) as:

              var {v file.c n}.

       External  functions  and variables are printed with a null
       source, i.e.,

              func {}.

       An ellipsis precedes the name of a function called  recur-
       sively, e.g.,

               ... func ... {mm}

   OOPPTTIIOONNSS
       -a        Print a separate call graph for each function.

       -A        Eliminate ansi keywords

       -P        Eliminate POSIX keywords

       -d _n_n     Print the call graph to at most depth _n_n.

       -g        Add to the list of C keywords GNU CC keywords.

       -i        Print  an  inverted graph of depth 2, i.e.,  for
                 each function (or variable if used with  the  _-_v
                 option),  print  a  list of functions which call
                 it.



                              PUBLIC                            1





CFLOW(1)                                                 CFLOW(1)


       -r _n_a_m_e   Print a call graph  with  function  or  variable
                 _n_a_m_e  as  root  (in the case of a variable, this
                 only makes sense if used with  the  _-_i  option).
                 This option may be repeated.

       -v        Print  references  to  global  variables.   Only
                 functions calls are printed by default.

       -x        Print each sub-graph in  full.   This  overrides
                 the  default  format where subsequent references
                 are abbreviated as described above.

       -D_m_a_c_r_o or -U_m_a_c_r_o or -I_d_i_r
                 Invoke cpp with the corresponding  options.   If
                 there  is  a  makefile, then the command _m_a_k_e _-_n
                 should indicate the proper flags to invoke _c_f_l_o_w
                 with.

       -X        eliminate  header files (empty files are made to
                 a temporary location).  This often makes  better
                 results  occur.   Files  to  look at eliminating
                 are:
                      stdio.h
                      errno.h
                      ctypes.h
                      stdlib.h

       -V        Echo commands as they are being executed.

AAUUTTHHOORRSS
       The graph printing command _p_r_c_g is essentially the one  in
       M.  M. Taylor's _c_a_l_l_s(1) as posted to the Usenet newsgroup
       comp.sources.unix.  A new parser, _p_r_c_c, is based on Steven
       Kirkendall's  _c_t_a_g_s(1)  command  which is distributed with
       the vi-clone _e_l_v_i_s(1).
       Marty Leisner (leisner@sdsp.mc.xerox.com) got this working
       on  SunOS  and  Linux,  and added a plethora of options to
       cflow; rewriting cflow to use bash.

EENNVVIIRROONNMMEENNTT
       Uses _$_C_P_P, which is  normally  $CC  -E.   If  $CC  is  not
       define, use gcc.
       _P_R_C_G is defaulted to be the prcg program.
       _P_R_C_C is defaulted to be the prcc program.

HHIINNTTSS
       Sometimes  redefine  CPP as cat will produce output if you
       see known.


BBUUGGSS
       An extern variable declaration is overridden by an  actual
       (global)  variable declaration.  A complaint is written to
       stderr whether there is a conflict or not.



                              PUBLIC                            2





CFLOW(1)                                                 CFLOW(1)


       Function parameters  are  ignored.   If  these  parameters
       share  the  names  of global variables, then references to
       them are  flagged as external references.

       The _s_t_a_t_i_c qualifier is ignored.  Only the  first  defini-
       tion of a function or variable is recognized.

       It appears a definition like
       mmaaiinn(()) {{ ffoooo(());; causes problems.
















































                              PUBLIC                            3