Tool to visualise code flow (C/C++) [closed]

2019-01-20 22:39发布

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?

16条回答
Rolldiameter
2楼-- · 2019-01-20 22:55

Rational Quantify also presents a nice call graph.

查看更多
Explosion°爆炸
3楼-- · 2019-01-20 22:57

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.

查看更多
乱世女痞
4楼-- · 2019-01-20 22:57

There's also AspectBrowser which doesn't work very good with Eclipse 3.4.0

查看更多
做个烂人
5楼-- · 2019-01-20 22:58

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.

查看更多
孤傲高冷的网名
6楼-- · 2019-01-20 22:59

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.

查看更多
男人必须洒脱
7楼-- · 2019-01-20 23:00

Profiling software gives you an idea of which functions have been called.

If you can use Linux, try KCachegrind

查看更多
登录 后发表回答