Static Call Graph Generator for C++ using Debugging Information

Yui Terashima, Katsuhiko Gondow · Proceedings - Asia Pacific Software Engineering Conference/Proceedings · 2007

In this paper, we present a novel method to detect virtual functions in C+ + programs using a light-weight binary-level analysis. We developed a tool, dcgg, that statically generates call graphs for C++ using DWARF2 debugging information based on this method. We use a combination of a binary analysis and debugging information to detect static function calls (including inline expanded functions) simply and precisely, and also virtual function calls (dynamic function calls in C++). Virtual function calls are detected by tracing types in registers and the stack. In a preliminary evaluation dcgg generated precise call graphs including inline expansions and virtual function calls. These techniques are important to C++ programmers as they help in creating efficient and maintainable code.

Read the paper · More papers on PaperTik