Re: Debug optimized code

RR <>
Wed, 17 Sep 2008 18:24:33 +0800

          From comp.compilers

Related articles
Debug optimized code (Stephan Ceram) (2008-09-16)
Re: Debug optimized code (RR) (2008-09-17)
Re: Debug optimized code (cr88192) (2008-09-17)
Re: Debug optimized code (Walter Banks) (2008-09-17)
Re: Debug optimized code (rcmetzger) (2008-09-17)
Re: Debug optimized code (Stephen Horne) (2008-09-18)
Re: Debug optimized code (Barry Kelly) (2008-09-19)
Re: Debug optimized code (George Neuner) (2008-09-20)
[6 later articles]
| List of all articles for this month |

From: RR <>
Newsgroups: comp.compilers
Date: Wed, 17 Sep 2008 18:24:33 +0800
Organization: Compilers Central
References: 08-09-076
Keywords: debug
Posted-Date: 17 Sep 2008 07:52:57 EDT


You can have a look at

"This white paper provides an outline on the concept of debugging
optimized code. This paper discusses the way compiler transformations
affect debugging, the practical problems in debugging optimizing code
and techniques that can be used to overcome the problems in debugging
optimized code.

There is a lot of activity currently on this subject. But after all
this, no usable product has evolved till date to debug optimized code.
This is due to the practical problems involved in debugging optimized
code. This white paper analyzes the practical problems in debugging
optimized code and presents a clear interface between a compiler and
debugger in achieving debugging of optimized code."

On Wed, Sep 17, 2008 at 5:37 AM, Stephan Ceram <> wrote:

        I've a question about compilers' symbolic debugging information (like
        DWARF2) and compiler optimizations. Should the code be always compiled
        without any optimizations, i.e. -O0, to get accurate debug information
        where all source code line number are correct or would I also get accurate
        results for higher optimization levels? Usually, at least -O1 does
        not modify the code too much, so I would assume that this optimization
        level could be applied for a successful debugging afterwards.
        What are you experiences?

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.