views:

150

answers:

5

I have taken over a large code base and would like to get an overview how and where certain classes and their methods are used.

Is there any good tool that can somehow visualize the dependencies and draw a nice call tree or something similar?

The code is in C++ in Visual Studio if that helps narrow down any selection.

A: 

In java I would start with JDepend. .NET NDepend

I dont know about c++ though :(

svrist
+1  A: 

Here are a few options:

The last one, Doxygen, is more of an automatic documentation tool, but it is capable of generating dependency graphs and inheritance diagrams. It's also licensed under the GPL, unlike the first two which are not free.

David Crow
A: 

David, thanks for the suggestions. I spent the weekend trialing the programs.

Doxygen seems to be the most comprehensive of the 3, but it still leaves some things to be desired in regard to callers of methods.

All 3 seem to have problems with C++ templates to varying degrees. CC-Rider simply crashed in the middle of the analysis and CodeDrawer does not show many of the relationships. Doxygen worked pretty well, but it too did not find and show all relations and instead overwhelmed me with lots of macro references until I filtered them out.

So, maybe I should clarify "large codebase" a bit for eventual other suggestions: >100k lines of code overall spread out over more than 100 template files plus several actual class files pulling it all together.

Any other tools out there, that might be up to the task and could do better (more thoroughly)? Oh and specifically: anything that understands IDL and COM interfaces?

HS
+1  A: 

When I have used Doxygen it has produced a full list of callers and callees. I think you have to turn it on.

cdv
A: 

When I have used Doxygen it has produced a full list of callers and callees. I think you have to turn it on.

I did that of course, but like I mentioned, doxygen does not consider interfaces between objects as they are defined in the IDL. It "only" shows direct C++ calls.

Don't get me wrong, it is already amazing what it does, but it is still not complete from my high level view trying to get a good understanding of how everything fits together.

HS