Do you have any sugestions of tools to ease the task of understanding C/C++ code? We just inherited a large piece of software written by others and we need to quickly get up to speed on it. Any advice on tools that might simplify this task?
相关问题
- Sorting 3 numbers without branching [closed]
- Multiple sockets for clients to connect to
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
Slickedit is great for navigating large blocks of code you don't know. The tags feature allows you to deal with the code on a functional basis, without having to deal with which file is it in. (EMACS actually has tags and is every bit as good as Slickedit, but with a slightly steeper learning curve)
When you get to a method or class or variable you don't understand, you just push-tag to go to that code, look it over, then pop-tag back. (those are bound to keystrokes, so it is very quick)
You can also use find-references to see where that function/variable is used.
Saves tons of time over having to go and figure out which file something is in.
Personally, I use the debugger. Run through the code and see what its doing, and where its going is the only way.
However, you can run it through some documentation-generators which (sometimes) help. A good example is doxygen.
Doxygen will give you class relationship diagrams if you use graphviz, even if you haven't specifically prepared for it.
doxygen is a free doc-generating tool (similar to Javadoc) that will also produce relationship graphs as well.
I personnaly use Visual Studio debugger tools.
It comes with the "Caller Graph" feature which will allow you to visualize stuff in little boxes. Also the Call Stack and the usual watch features are usually all I need
i tried a tool named Visustin which is not very great graphically but does what it says: Flowchart from Code. http://www.aivosto.com/visustin.html