Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!ima!johnl From: johnl@ima.UUCP Newsgroups: mod.compilers Subject: Re: Debuggers Message-ID: <525@ima.UUCP> Date: Mon, 23-Mar-87 18:09:22 EST Article-I.D.: ima.525 Posted: Mon Mar 23 18:09:22 1987 Date-Received: Thu, 26-Mar-87 01:12:09 EST Sender: johnl@ima.UUCP Lines: 30 Approved: compilers@ima.UUCP I just wanted to add some notes to the previous comments on debugging optimized code. At MIPS we planned for debugging optimized code by providing data structures to include information to map code back to source even after it was heavily modified by the optimizer (e.g. we save one line information datum per instruction of text in a very compact form so that we can map it to the source code generating it -- or approximate if more than one source line contributed to a single instruction). We also provided for levels of debugging information akin to levels of optimization. So far, we've noted that the only people who need to debug optimized code are the compiler group and the level of debugging you get with just letting the debugging info go where it will after optimization is sufficient to fix the optimizer when it's broken (not the best, but sufficient). People seem satisfied to debug non-optimized code and then re-compile their program when they think it works-- some may even keep two copies of the binaries around, one for debugging and one for production. So we do not provide complete debugging for optimized code. In order to do so we would need two things: fill out our optimization tables describing register mapping on a basic block boundary, procedure inlining, etc. and decide on a way to present a coherent view of a program written one way but appearing another way at debug time. The former would consume a large amount of space and latter is probably an AI project. Mark I. Himelstein decwrl!mips!himel -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request