Automatic inspection of program state in an uncooperative environment
- Computer Science Department UFMG Belo Horizonte Brazil
- Center for Applied Scientific Computing Lawrence Livermore National Laboratory Livermore California USA
Abstract The program state is formed by the values that the program manipulates. These values are stored in the stack, in the heap, or in static memory. The ability to inspect the program state 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 so‐called uncooperative environment. In this article, 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 trading precision for performance. In this article, we demonstrate how to use inspection points to debug compiler optimizations; to augment benchmarks with verification code; and to visualize data structures.
- Sponsoring Organization:
- USDOE
- OSTI ID:
- 1897788
- Journal Information:
- Software, Practice and Experience, Journal Name: Software, Practice and Experience Journal Issue: 12 Vol. 52; ISSN 0038-0644
- Publisher:
- Wiley Blackwell (John Wiley & Sons)Copyright Statement
- Country of Publication:
- United Kingdom
- Language:
- English
Similar Records
Archer
Enabling human–infrastructure interfaces for inspection using augmented reality