[Gambas-user] Flow graphs

Tobias Boege taboege at ...626...
Wed Dec 31 15:37:19 CET 2014


On Wed, 31 Dec 2014, Jussi Lahtinen wrote:
> Any tools or suggestions how to make easily call/flow graph from Gambas
> project?
> 

I thought about this a few days ago :-) I would imagine, given a path sPath
to a project directory, you can do

  Exec ["gbc3" "-av", sPath] To sOutput

then parse sOutput for CALL instructions and the preceding PUSH instructions
which tell you which function was called. Of course, these CALLs are made
from other functions. You feed those relations to a GraphMatrix (gb.data)
and use the Graphviz project I uploaded yesterday to the software farm to
create a Picture object from this graph.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list