Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Building control flow graph for C/C++ code using CDT

Hi Ridhi,

I don't have a specific answer for you - but you can look in this direction.

Eclipse CDT includes a feature called Codan (Code analysis) that does use/make (not sure which) CFGs to do some of that analysis. There is an example plug-in called org.eclipse.cdt.codan.ui.cfgview which includes a view to visualize the CFG called ControlFlowGraphView that you can look at to see how it gets the CFG and apply that to your own work.

This archived content on the Wiki may be useful too: https://wiki.eclipse.org/CDT/Archive/designs/StaticAnalysis

HTH,
Jonah


~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Tue, 26 Jul 2022 at 01:33, Ridhi Jain <ridhij@xxxxxxxxxxx> wrote:
Hi

I want to build a control flow graph of a C/C++ code snippet. I can get the IASTTranslationUnit and can also visit each node in the AST.  However, I could not find any code to generate a CFG for the same code. Can you please help?

Apologies if you have received multiple copies of this question.

--
Thanks 
Ridhi 
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top