My question is different from though similar to the ones such as:
Tools to reverse engineer C++ ( i.e. to view C++ classes )
Instead of looking for class diagrams, I'm more interested in finding call chains and dependencies and generating nice-looking graphs.
Is there such a tool? I know cscope and ctags can do a little bit of what I'd like to do but in very much low-level interactive manners (one query at a time). I'd like something more automated, e.g., given an API, find all its sub-routine call paths till it reaches the leaf and show them to me.
Is there a tool for this already? Is it possible to do it at the binary level? like reverse-engineering function dependencies in a library (.a, .so, .dll as input)?
EDIT:
I prefer static analysis tool over profilers since I would like it to work for library and module code as well.
Also I prefer cross-platform solutions. I'm mainly on a Mac but tools for Linux or Windows will be interesting as well.
UPDATE
After researching into the recommendations I decided that Doxygen is what I want. It gives caller and callee graphs, and uses static analysis, cross-platform, and free.
Thanks to all the other recommendations. They opened my eyes quite a bit.