05/01/1990 09:00 AM
Computer Science
Optimizing compilers produce code that impedes source-level debugging. After optimization, the correspondence between a program\'s source code and object code is not straightforward. This thesis provides a solution to one of the more difficult source-level debugging problems caused by optimized code. The first third of the thesis examines the problems caused for source-level debuggers by optimization and presents a detailed survey of previous research in the area. It is noted that some of these problems are not difficult, but remain problems due to inertia in the production- software development process. The final two-thirds of the thesis develop a solution for one of the difficult problems examined in the first part of the thesis. The problem is that of determining when optimization has caused a variable to contain an unexpected value, that is, a value that differs from the value one would expect it to contain from an examination of the source code. More formally, at a breakpoint in an executing program, a variable contains an unexpected value if its value results from a different computation than in an unoptimized version of the program stopped at an equivalent breakpoint. This is detected by having the optimizing compiler provide information about how variable definitions in the optimized code differ from variable definitions in the source code. In particular, the compiler creates records for each statement in the program which are referred to by pre- and post- optimization versions of the program flow graph. By comparing reaching definitions computed on the two versions of the flow graph, unexpected values can be detected. The solution is effective (and uniform) for both local and global optimizations and is largely independent of the particular optimizations that have been performed. Notes: M.S. Thesis

This report is not available for download at this time.