2

I need to get into and make some modifications to a software component written in C++. I am fantasizing about generating some map of the code, that would show relationships between classes and walk me through the flow / call graph of methods. Is there a tool for this?

Years ago I worked with Rational Rose modeling tool with had a feature of reverse-engineering the code and building a class diagram for it. However what's important for such project exploration is also some dynamic information like sequence diagram (ideally) or call graph. Not mentioning that Rose is too big for such one off task and actually I don't know if it exists at all still.

davka
  • 13,974
  • 11
  • 61
  • 86

4 Answers4

5

I personally use Doxygen https://github.com/doxygen/doxygen and its truly among the easiest program to configure in a way that makes output like what you describe.

To generate call graphs you would also need dot which you can get in graphviz http://www.graphviz.org/. There might be some other dependency's but in those cases it should say so in the configuration file which by the way is rather well commented.

The configuration file of Doxygen might seem extensive at first, but the end result is worth it.

kongo
  • 161
  • 4
  • 1
    thanks, generated a beautiful cross-reference of the code with diagrams with use of doxywizard, which is good enough for my need. thanks for the tip! – davka Jun 06 '13 at 12:21
3

Warning, Douml was made from an old free version of BoUML (unfortunately not the last of them), when porting it in Qt4 the team introduced a lot of bugs, and at least because of that the result is unusable. Furthermore the team didn't worked on the plug-outs mechanism, so you aren't able to define you own plug-out etc. So it is better to get BoUML, it is not free but the price is very low compared to other UML tools. Zeks, BoUML has an automatic layout in the class diagrams. My two cents.

bruno
  • 32,421
  • 7
  • 25
  • 37
  • you are the author of BoUML by chance? – davka Jun 06 '13 at 12:19
  • {joke} this would be a chance for you or for me ? – bruno Jun 06 '13 at 12:49
  • "you aren't able to define you own plug-out" Atm, yes. I have to agree. But key here is "at the moment". Scrapping your plugout mechanism in favor of something simpler is next on my agenda. In a few months, writing plugouts for Douml will be incomparably simpler than using your TCP driven and badly documented madness. – Zeks Jun 09 '13 at 13:21
  • 1
    Looks like since the release 7.0 BOUML is again a free software =) – Megidd Jul 04 '20 at 06:13
2

Take a look at BOUML, I think that's exactly what you're looking for:

http://www.bouml.fr/screenshots.html

Rob
  • 11,492
  • 14
  • 59
  • 94
  • Bouml does not automatically generate diagrams so it's not exactly suitable for the task. – Zeks Jun 05 '13 at 21:24
  • looks interesting but had problems installing it on RHEL, and also it does not have a trial version. Doxygen was good enough for me now. – davka Jun 06 '13 at 12:23
2

If doxygen is not enough, I'd look into Enterprise Architect for the task. It's not free but it will generate your diagrams and code model. Although, tbh, I think doxygen is exactly what you need, and it's free to boot.

Btw, If you do decide to go Bouml way (generate code model, then make diagrams by hand), consider picking Douml from sourcefoge. Unlike Bouml, it's still free.

Zeks
  • 2,265
  • 20
  • 32
  • looks interesting, I would try it but it's Windows only. You're right, doxygen was good enough and quick to get results – davka Jun 06 '13 at 12:25
  • 1
    It's not windows only. you can either compile it yourself (the link to github is on the top of sourceforge page) or grab it from this repo : https://launchpad.net/~pasgui/+archive/ppa/ – Zeks Jun 06 '13 at 15:01