views:

655

answers:

4

I am working on an academic research regarding some very long functions in the Linux kernel (link, link).

For that research, I would like to use some code flow visualization tool, that would be able to plot a graph in which each vertex is a decision point and each edge is a piece of code which runs in a consequent way.

Do you know of any good, open source project that can visualize C code?

+1  A: 

DOxygen does some amount of 'visualization',
but you need to work on the code a bit for it to be usable.


Another interesting thing to check would be lxr

Linux Cross Referencer is a software toolset for indexing and presenting source code repositories. LXR was initially targeted at the Linux source code, but has proved usable for a wide range of software projects. lxr.linux.no is currently running an experimental fork of the LXR software.

nik
+1  A: 

History flow's are very neat for changes/diff across multiple versions.

Codeplex has a project, Dependency Visualizer which does support C also.

Gprof2Dot can render oprofile, this would get you dynamic info also.

CodeViz also (static tool) would work.

If your using gcc, gcc-xml has an introspector plugin also todo this.

RandomNickName42
A: 

You appears to want to acquire a flowchart of C source code ("decisions", "code blocks").
Something like this C flowchart?

To do this correctly, esp. for Linux kernal code, I'd expect you to have to preprocess the code first to get rid of macros and conditionals. I would assume that GCC would construct such a graph internally and that you ought to be able to get your hands on that graph.

Ira Baxter
+5  A: 
Duncan Beevers
Very nice indeed. I'll try it.
Adam Matan