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
Rational Quantify also presents a nice call graph.
KScope, built upon the cscope utility, if you're on linux (KDE). The best thing I ever used (and use all the time) to deleve into some huge piece of unfamiliar code which I have to modify somehow or which API I'm to employ for my needs. Among its features are the cross-reference database, which can be searched in a plenty of ways: you can find all references of a symbol, its global definition, find callers/callees of a function and much more. It even has a built-in IDE and an ability to show a call-graph.
There's also AspectBrowser which doesn't work very good with Eclipse 3.4.0
There are some tools like Egypt http://www.gson.org/egypt/egypt.html that work, but only if you match the expected GCC version used to compile the code and the exact version of the callgraph generator. The same can be said about codeviz http://www.csn.ul.ie/~mel/projects/codeviz/
Other option is valgrind used in cachegrind mode (it generates a type of callgraph that you can follow from kcachegrind program.
try AQtime, It's a profiling tool that displays all the functions that got called (and the time it took), you can set the start and end points for the analysis. They have a 30 day trial.
Profiling software gives you an idea of which functions have been called.
If you can use Linux, try KCachegrind