C++ code visualization

前端 未结 9 777
醉酒成梦
醉酒成梦 2021-02-03 12:00

A sort of follow up/related question to this.

I\'m trying to get a grip on a large code base that has hundreds and hundreds of classes and a large inheritance hierarchy.

9条回答
  •  故里飘歌
    2021-02-03 12:46

    I've had most success with valgrind and kcachegrind to do this. You run valgrind against your debugging binary, perform whatever actions your interested in, then import the output into kcachegrind to see everything you'd ever want to know about who called what, how often, and when. Plus, because your doing it dynamically, it catches cases that static analysis likely wont.

    I've also had some success using Enterprise Architect's reverse engineering features, although this doesn't end up nearly as nicely (but you get a workable UML model which is nice!).

    And finally, a tool called "Understand". This is pretty good at static OO analysis, but I think quite pricey and not that widely used.

提交回复
热议问题