I sometimes need to modify OSS code or other peoples' code (usually C-based, but sometimes C++/Java) and find myself "grep"ing headers for types, function declarations etc. as I follow code flow and try to understand the system. Is there a good tool that exists to aid in code browsing. I'd love to be able to click on a type and be taken to the declaration or click on a function name and be taken to it's implementation. I'm on a linux box, so replies like "just use Visual Studio" won't necessarily work for me. Thanks!
相关问题
- Multiple sockets for clients to connect to
- What is the best way to do a search in a large fil
- glDrawElements only draws half a quad
- Index of single bit in long integer (in C) [duplic
- Equivalent of std::pair in C
I've heard amazing things about OpenGrok. I know another team at my place of employ uses it and they find it very handly. From its web site:
cscope has always been my favorite. There is also cbrowser, but I have not tried it. ctags is also used a lot.
I use and like the free software tool GNU global.
I do a bit in the kernel space, and keep coming back the scope.
For example:
$ cd /usr/src/redhat/BUILD/kernel-version
$ cscope -R -p4
I usually "live" in c-scope when working on someone elses project. I use this to open files with "gvim" (my IDE), edit things, then quit "back" to c-scope, It helps me keep task focused.
I believe that cscope can be configured to work with vim and emacs, although I've seen people use other editors also.
Best of luck to you.
The Eclipse IDE is capable of working with C/C++ in addition to Java. There is a write-up on how to configure Eclipse for C/C++ development on IBM's Developer Works site.
edit: Why has this been voted down? It is a valid answer. Eclipse with the C/C++ addon will allow the question author to do what he is wanting to do. I am not the only one to have suggested, yet the others have not been voted down. So why has this one been voted down?
You can't get anything better than SourceInsight.