[LLVMdev] [cfe-dev] Meaning of LLVM optimization levels

Renato Golin renato.golin at linaro.org
Fri Jun 7 10:34:21 PDT 2013


On 7 June 2013 17:52, Dallman, John <john.dallman at siemens.com> wrote:

>  Is it possible for the debug information to mark all the instructions
> that arise from a
>
> language statement as coming from that statement, even though the
> instructions may
>
> be widely scattered?
>

I'm not aware Dwarf supports statements, but it does support line and
column information, so if the sources are accurate, you can get
"statements" but not as a compiler would recognize, just as a string.

Line information is normally passed along optimizations and inlining, and
this is why debugging at O2/O3 has the effect of jumping randomly through
steps in the debugger. But the interaction of the debugger and the core is
extremely complex: breakpoints don't break in the right place, you might
break on the wrong thread, or not break at all, stepping doesn't change
lines consistently, you might step out of a function without noticing, etc,
etc.

Even if LLVM (or any compiler) kept all the debug information intact, it
still wouldn't mean much for the debugger if it couldn't make heads or
tails of that information as the core would chug along at random
instructions.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130607/7832edbb/attachment.html>


More information about the llvm-dev mailing list