arXiv.itsnick.co

an independent field guide to 23 million papers from arXiv & OpenAlex — not affiliated with arXiv.org

Computer Science · Software

Static Call Graph Generator for C++ using Debugging Information

Yui Terashima, Katsuhiko Gondow

See on the map

Abstract

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.

More like this