The code_graphs package is a set of bash and
perl scripts that generates interactive graphical
representations of C source and object code. These
graphs are in the form of a set of pdf files. They
are intended to be viewed interactively in a web
browser equiped with a plug-in for a pdf viewer.
I find that Adobe's acroread is the best tool
for this because it supports panning and scrolling
using the mouse in "palm" mode, and it supports
zomming in and out with the mouse wheel. The
combination of these operations provides you with the
ability to explore these intracate graphs in as much
detail as you desire.
For any of these graphs, there will be a "table of
contents" frame to the left of the graph containing
the names of the nodes in the graph. You may click on
any of these entries to view the maximal subgraph that
contains only that node, together with its direct and
indirect predecessors and successors.
These graphs fall into the following groups:
The following demonstrations of code_graphs
are provided so you can see what it will do:
You may fetch the source code for the code_graphs
package and try it out on your own programs.
NOTE: The determination of the stack frame
size for each function is highly compiler and
target CPU dependent. The script provided,
stack_frame.sh, is only designed to
work with the Gnu gcc compiler compiling C, not
C++, source code, and an amd_64 target CPU. Other
compilers, CPUs, and architectures will require
changes to this script. It is the author's hope that
over time, such other scripts will be developed.
|