For Delphi 2010, is there a way to get a diagram, starting with function X (or even the whole program), of what other functions/procedures are called...
Something along the lines of:
Function X
- Function A
- Procedure B
- Procedure C
- Function D
(Of course graphical would be nicer...)
Peganza Pascal Analyzer offers both call tree and reverse call tree reports. There are a number of other static code analyzers available, but this is the one I am familiar with.
So far as I know, there is nothing of this nature built in to Delphi.
Here is an example of an AQTime call chart. AQTime's call sequences can be gathered either dynamically (gathered from a running program) that means you have to activate the code path you want to chart (make sure some menu or button you can click in the UI calls this code) and then you can chart it, or they can be gathered statically. The dynamic one might seem like more work, and you might think that static analysis is better, and in some ways static analysis is better, but dynamic call sequence charts are actually "what really happened in one particular run" whereas static analysis provides "what the parser could figure out to be always true, whether or not this code path even gets run by you, or your customer at all". In fact, I recommend using both paths, and comparing them to see what you learn.
AQTime pro is quite expensive, but I am unaware of any free alternatives. (No I don't work for SmartBear, or Embarcadero.). I am a professional developer, and I find that such tools are worth the price. Your call.
I usually use the call sequence feature while running from the performance profiler, so that I get some Time values (the digram below shows Time: #.## msec
because the data was gathered by the performance profiler, dynamically, rather than by the static analysis profiler, which doesn't know how long a function takes to execute).
IDA Pro can do that for you. . (for any program, not only delphi progs)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With