 |
|
 |
 |
 |
  | Cflow is the program that takes C files and prints out the call graph.
|
 |
 |
 |
 |
 |
  | -r to specify where to root the graph (main is a good place to start)
|
 |
 |
 |
 |
 |
  | -P and -A remove commonly used keywords, like strncmp et al
|
 |
 |
 |
 |
 |
  | One way to get a reasonable graph is:
|
 |
 |
 |
 |
 |
  | cflow -r main -d 4 $(ALL_INCLUDES) $(LTLIBRARY_SOURCES) > cflow.out cflow2dot < cflow.out > cflow.dot dot -Grankdir=LR -Tps < cflow.dot > cflow.ps
|
 |
 |
 |
 |
 |
  | This is in Makefile and using the includes and stuff helps with getting everything we need as cflow is just using CPP and friends to do its work. It's really a compiler that doesn't produce objects as an output.
|
 |
 |
 |
 |
 |
  | cflow: Various, often part of OS
|
 |
 |
|


|
 |
 |