In my work / study, I have had to look at, understand, and modify non-trivial code written in an object-oriented style, with little documentation. For my case these are architectural simulators in C++.
I would like to know from more experienced people about what are some of the more efficient ways to look at and understand an existing project. This is an open-ended question, and maybe I am not being able to express properly what I mean, but this is an important issue for me. Every time I have to modify a simulator or some other tool, I spend quite a lot of time struggling with understanding the flow. I am trying to make this process more efficient and less time-consuming.
Are there tools that can take a code base and generate a useful diagram representation like UML diagrams? Also are there any specific techniques that has been useful to you while analyzing code?