Fragen? Antworten! Siehe auch: Alternativlos
I just heard of an interesting gcc option: -fdump-ipa-cgraph
You need to enable the optimizer for it to do anything. Then it will dump the raw data you need to create a nice call graph to a file. For "t.c", the file is called "t.c.000i.cgraph". For my example, it looks like this:
Initial entry points: main compint fooInteresting option, to be sure. It should be relatively easy to convert this to a .dot file or so. Thanks to xonox for pointing me to this option!
Unit entry points: main compint fooInitial callgraph:
write/74(-1):
called by: foo/68
calls:
printf/72(-1):
called by: main/70
calls:
[…]