Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Use graphviz[0], forget manual graphing. While many tools can generate a call graph, confidence rolling your own is a good superpower to have.

For example, write a quick script to add a panic (nonexistantFunction()) as the first line of each function. Then, call each function in turn. Save the panic's function stack trace, then process them as a combined graphviz file.

This simple and efficient hack will get you all the most important edges in most cases for most languages. It won't get you the internal links, for those you need a more effective parser or more exotic means of obtaining branched call stacks.

[0] http://graphviz.org/



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: