The debugging environment described in this paper differs from previous work by its close interaction with the back-end of an optimizing compiler VPO (very portable optimizer) []. An overview of the environment is given in Figure 1. The back-end of a compiler has been modified to emit control-flow and instruction information. This information is analyzed statically by a simulator. The simulator determines much of the caching and pipeline behavior statically, thereby reducing the overhead during program debugging. It then emits instrumentation code that is incorporated into the executable. The instrumented program can then be debugged by a regular debugger and the elapsed (virtual) execution time can be queried at any point. The virtual execution time is calculated on-the-fly on request by calculating the elapsed number of processor cycles based on the cache and pipelining simulation up to this point. The number of cycles can be inferred from a frequency counter for each basic block and simple state transitions simulating the remaining cache and pipelining behavior that could not be determined statically.
![]()
Figure 1: Overview of the Debugging Environment