Reputation: 346
We need to create a CFG for some custom intermediate language code. We are currently using Qt + graphviz - and the CFGs look like ass.
Specifically, we cant seem to figure out how we can
get the "flow" (from top to bottom) into the graph, and
make the connecting lines go AROUND the other graph nodes.
Anyways, we were admiring the awesome IDA CFGs - and noticed that IDA does not seem to use graphviz at all! GV adds x MB of dependencies to our project, and we'd love to get rid of it.
SO the questions is: does anyone know what IDA uses for graph rendering and sorting?
We considered writing a IDA plugin to use the graphing feature, but that seems a little over the top for what we want to do.
Upvotes: 3
Views: 3425
Reputation: 8166
I think that IDA use its own graph library (although you might ask Ilfak Guilfanov for a definitive answer about that).
What you're looking for is called "Sugiyama graph layout algorithm" (see: Layered graph drawing).
There is a really interesting paper about this problem (especially focusing on CFG) on citeseerx (see: Graph Layout for Code Flow Visualization).
As stated in the aforementioned paper the OGDF provides a Sugiyama layout algorithm although it might require some tweaking.
Hope that helps !
Upvotes: 3
Reputation: 26171
Last I Checked they used (Q)WinGraph, you can get their modified source from this page (based off of VCG tool).
Something similar is yED which you might also want to check out & there are a few IDA scripts that use TouchGraph as well (which doesn't seem to be free).
Upvotes: 3