Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [cdt-core-dev] How to get function call from a c/cpp projectthrough CDT

Hello,
 
sorry for the late reply, these were some pretty busy days ...
 
Yeah, everything I konw about the CVisitor I learned while tracking down https://bugs.eclipse.org/bugs/show_bug.cgi?id=109506 so if you look at comment # 5 https://bugs.eclipse.org/bugs/show_bug.cgi?id=109506#c5 then this will show you an entry point to where a CVisitor is used. Start a debugging session and watch the visitor travel through the AST.
 
If you wish to see a nice tree representation of the AST of your source then you should install the CDT testing feature e.g. http://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/eclipse3.1/dist/3.0.1/org.eclipse.cdt.testing-3.0.1.zip for CDT 3.0.1
After that (and restarting eclipse) you can the DOM AST view for the current editor (somewhere under Windows --> Show View, not sure where at the moment.)
 
That should help you to get a better understanding.
 
 
Cheers,
 
Norbert


Von: cdt-core-dev-bounces@xxxxxxxxxxx [mailto:cdt-core-dev-bounces@xxxxxxxxxxx] Im Auftrag von jamsheer pk
Gesendet: Freitag, 20. Januar 2006 14:01
An: cdt-core-dev@xxxxxxxxxxx
Betreff: [cdt-core-dev] How to get function call from a c/cpp projectthrough CDT

Hai,

         Thank you r for u r help. I  got root of DOM and now i am able walk throgh that tree.

          IASTTranslationUnit asttu = CDOM.getInstance().getTranslationUnit(filetoParse);

Can u please tell me something more about the visitor which i should use for the purpose of getting all function calls and method invocation from the c/cpp project.






--
"Our Greatest Glory is Not in Never Failing, But in Rising Every Step We Fall "

Back to the top