The program state is formed by the values that the program manipulate. These values are stored in the stack, in the heap, or in statically allocated memory. The ability to inspect all these values is useful as a debugging or as a verification aid. Yet, there exists no general technique to insert inspection points in type-unsafe languages such as C or C++. The difficulty comes from the need to traverse the memory graph in a also-called uncooperative environment. In this paper, we propose an automatic technique to deal with this problem. We introduce a static code transformation approach that inserts in a program the instrumentation necessary to report its internal state. Our technique has been implemented in LLVM. It is possible to adjust the granularity of inspection points in terms of breath and depth. The former dimension defines where they are inserted in the program; the latter, which memory regions they track. The evaluation performed in this paper indicates that they are efficient when used sparingly, and add a minimum performance overhead in the programs.
Program Display Configuration
Tue 2 Mar
Displayed time zone: Eastern Time (US & Canada)change