What is a good tool to aid in browsing/following C

2019-02-01 17:40发布

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!

27条回答
forever°为你锁心
2楼-- · 2019-02-01 18:33

Any IDE will work fine. Netbeans and Eclipse are java based but have plugins for C/C++

查看更多
Viruses.
3楼-- · 2019-02-01 18:35

Doxygen is wonderful. I've had to get across several legacy code bases that I was never involved in before, and it's been fantastic for that (even though the code bases were not documented using Doxygen format).

查看更多
爷、活的狠高调
4楼-- · 2019-02-01 18:35

IntelliJ is pretty good as a source browser under Linux. It's got really good support for jumping between source and function declarations. Haven't tried it with C/C++ code, but it works well with Ruby and Java.

查看更多
走好不送
5楼-- · 2019-02-01 18:35

I use kscope, which uses cscope in the background, but provides function lists etc. as well. Seems to handle large projects like the linux kernel well too. The kscope homepage has a good concise description of what it does and doesn't do.

查看更多
【Aperson】
6楼-- · 2019-02-01 18:37

Doxygen can generate an set of web pages that include a source browser. Not quite as fancy as an IDE, but all it needs is a web browser.

查看更多
Emotional °昔
7楼-- · 2019-02-01 18:38

If you are involved in projects which have a mix of HLL code along with Assembly i'd recommend Opengrok, i have recently shifted to Opengrok and find it amazing, Opengrok + Firefox + Extensions is the best combination in my opinion, a few firefox extensions like Scrapbook etc allow you to modify and add notes while you are browsing code, again this is mostly for 'Browsing' through code and not for modifying it on the fly.

查看更多
登录 后发表回答