1 This script generates graphivz dot files from a cxref function
4 Graphviz is a graph drawing tool from AT&T. You can get more information
5 on graphviz from http://www.research.att.com/sw/tools/graphviz/
7 This script works in a similar manner to the xrefgraph.py script. It has
8 some extra functionality, viz ; the ability to draw just part of a call
9 tree, and extra parameters for controlling the final layout.
11 To see the full description of the program, run
17 If you just wanted to show the call trees for functions in a
18 file func.c, you would invoke
20 xrgr.pl -n func.c -o outfile.dot cxref.function
22 You then produce a call graph by running e.g.
24 dot -o graph.out -Tps outfile.dot
26 Sometimes it is useful to cluster functions in a file. This can
27 show things like inappropriate modularity (functions that really belong
28 somewhere else). The -c option clusters functions in a file.
30 xrgr.pl -n func.c -c func.c -o outfile.dot cxref.function
32 One of the difficulties with graphviz diagrams is that they can be quite
33 large. If you try to put them on a single sheet, they can be illegible.
34 The alternative is to use multiple sheets, or A3 size paper if you are
35 lucky enough to have an A3 printer.
37 -t multi : multiple pages
39 -t compress : squishes things up but can look really squashed
41 -k deletes calls to functions that are not defined in your code. This will
42 eliminate showing calls to standard library functions.
44 You can also draw the call tree for a single function. This will also
45 help in fitting information onto a single sheet.
47 The following shows the call tree for function CheckFunctionVariableRef,
48 eliminating calls to standard library functions.
50 xrgr.pl -k -f CheckFunctionVariableRef -o xx cxref.function
54 jhonan@optushome.com.au