Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to collect list of functions from a C file.(CDT)
How to collect list of functions from a C file. [message #1085536] Tue, 13 August 2013 03:07 Go to next message
Nikhil Shirodkar is currently offline Nikhil Shirodkar
Messages: 9
Registered: May 2013
Junior Member
Hello,
I am new to CDT. I want to collect the list of functions present in a given ".C" file along with the headers used by the same.
In short I want to collect, what is shown in "OUTLINE" view of eclipse, when a ".C" file is opened in eclipse.
My final goal is to develop a plugin that will take path of ".C" file as input while the list of functions and header file used as an output.
Please help me- how can I collect such information? Any code sample will be a great help.

Thanking all of you in advance.
Re: How to collect list of functions from a C file. [message #1086437 is a reply to message #1085536] Wed, 14 August 2013 07:50 Go to previous messageGo to next message
Yevgeny Shifrin is currently offline Yevgeny Shifrin
Messages: 202
Registered: July 2009
Senior Member
Hi,

I would suggest asking this question in CDT mailing list.
https://dev.eclipse.org/mailman/listinfo/cdt-dev

Thanks,
Yevgeny
Re: How to collect list of functions from a C file. [message #1086451 is a reply to message #1086437] Wed, 14 August 2013 08:13 Go to previous messageGo to next message
Nikhil Shirodkar is currently offline Nikhil Shirodkar
Messages: 9
Registered: May 2013
Junior Member
Thank you Yevgeny for your suggestion.
Re: How to collect list of functions from a C file. [message #1091664 is a reply to message #1086451] Wed, 21 August 2013 20:45 Go to previous message
Rob Vito is currently offline Rob Vito
Messages: 1
Registered: August 2013
Junior Member
I don't know how to do it on windows, but on linux, you can do this:

> ctags -x | awk '$2 = /function/ {print $1}'

It was just a coincidence I recently needed to do this.


-rob
Previous Topic:CDT Project
Next Topic:thank u sa
Goto Forum:
  


Current Time: Sat Sep 20 12:15:42 GMT 2014

Powered by FUDForum. Page generated in 0.13110 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software