LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-19-2006, 03:04 PM   #1
stingerkiss
LQ Newbie
 
Registered: Aug 2006
Posts: 4

Rep: Reputation: 0
Utility to find C function defintions, variables, etc...


Hi all,

I'm looking for a tool that could find C/C++ function definitions, variables, structs or whatever, inside a big source tree. Did some googling to no avail , help anyone ?
 
Old 11-19-2006, 03:35 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
ctags does this. It looks through C code for such things and builds an index file which can be used with some editors to find definitions of function you call from your own code. For example vi can read these tags files. This tagging method is a real gem, and it's really really worth finding out how it works.

If you use emacs, it doesn't read tags files generated by ctags, but has a very similar program called etags which creates tags for emacs.

Typical use is that you open a program file, see a function used from some library which you're not familiar with, move the cursor over the function, press some key combo, and the editor opens the file where that function is defined and jumps to the definition. It's really great.

The tags and etags output are well documented formats, and you'll be able to use them in your own code easily.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing variables inside a function bahadur Programming 1 03-27-2005 04:41 AM
Static Variables in C function swifty99uk Programming 4 04-14-2004 10:50 AM
Utility to find out FSB siddiqu Linux - Hardware 5 06-16-2003 12:10 AM
utility to do dd's function in win2k? Deeboo Slackware 8 03-24-2003 05:57 PM
What's in my computer/Utility to find out geraldgu Linux - Software 2 12-14-2001 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration