Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!ncar!ico!haddock!ima!esegue!compilers-sender From: jclark@src.honeywell.com (Jeff Clark) Newsgroups: comp.compilers Subject: Re: Debugging optimized code Keywords: debug, report, optimize Message-ID: <1990Jul31.182620.4651@esegue.segue.boston.ma.us> Date: 31 Jul 90 18:26:20 GMT References: <1990Jul30.180211.26558@esegue.segue.boston.ma.us> <1990Jul30.225825.28729@esegue.segue.boston.ma.us> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: jclark@src.honeywell.com (Jeff Clark) Organization: Compilers Central Lines: 74 Approved: compilers@esegue.segue.boston.ma.us In-Reply-To: pattis@cs.washington.edu's message of 30 Jul 90 22:58:25 GMT Posted-Date: 31 Jul 90 15:09:59 GMT In article <1990Jul30.225825.28729@esegue.segue.boston.ma.us> pattis@cs.washington.edu (Richard Pattis) writes: > Polle Zelweger. Her thesis was done with John Hennessy at Stanford, but > Polle got her Ph.D. at Berkeley (both institutions may have published the > Thesis). She is now at Xerox PARC. It is available as Tech. Rpt. CSL-84-5 from Xerox PARC. The citation and abstract follows. @TechReport{zell84, author = "Polle T. Zellweger", title = "Interactive Source-Level Debugging of Optimized Programs", institution = "Xerox Palo Alto Research Center", year = "1984", OPTtype = "Research Report (PhD Thesis)", OPTnumber = "CSL-84-5", OPTaddress = "3333 Coyote Hill Road, Palo Alto, California 94304", OPTmonth = "May", OPTabstract = "The transformations performed by an optimizing compiler have traditionally impeded interactive debugging in source language terms: after optimization, a program's source text and object code do not have a straightforward correspondence. This dissertation shows that effective interactive source-level debuggers can be provided for optimized programs. Such debuggers can reduce debugging time and programmer confusion. These benefits are especially important given the increasing availability of optimizing compilers. The first half of the dissertation studies the overall problem of debugging optimized programs. It presents a general view of debuggers and defines two important levels of debugger behavior for optimized programs. A debugger provides ``expected behavior'' if it hides the effects of the optimizations from the user by doing behind the scenes processing. It provides ``truthful behavior'' if it indicates that it cannot give the exact answer to a debugging query (because the executing programs differs from the source program). The user may be able to deduce the correct answer from the partial information displayed by a truthful response. A thorough study of the interactions between optimization and debugging is included. In addition, a collection of solution techniques to relieve the problems caused by optimization are described. The second half of the dissertation describes implementation experience with one aspect of the problem. A prototype debugging system called Navigator was developed for the Cedar programming environment at the Xerox Palo Alto Research Center. Navigator can be used interactively to monitor program execution flow in the presence of two simple but nontrivial optimizations: inline procedure expansion and cross-jumping (merging identical tails of code paths that join). Navigator provides expected behavior by combining information collected by the compiler about the effects of the optimizations and information collected by the debugger about the control-flow history of the computation. Program execution space and speed are almost totally unaffected when no debugging requests are active. When debugging is requested, Navigator provides its added functionality without noticeably degrading debugger response time for most programs. Proofs of correctness of the compiler and the debugger algorithms are given, as well as an analysis of their efficiency."} Jeff Clark Honeywell Systems and Research Center Minneapolis, MN inet: jclark@src.honeywell.com tel: 612-782-7347 uucp: jclark@srcsip.UUCP fax: 612-782-7438 [A similar message from johnson@cs.uiuc.edu pointed out that the PARC report is preferable to other sources because it contains graphics missing from other versions. -John] -- Send compilers articles to compilers@esegue.segue.boston.ma.us {spdcc | ima | lotus| world}!esegue. Meta-mail to compilers-request@esegue.