[LLVMdev] debug info for global variables when optimising

Dale Johannesen dalej at apple.com
Mon Jun 1 10:48:31 PDT 2009

On May 29, 2009, at 6:24 AMPDT, Jay Foad wrote:

> I see that llvm-gcc now has some support for generating debug info
> when optimising - thanks!
> However, it still doesn't generate debug info for global variables
> when optimising. Is there any reason for this? With the attached
> patch, the whole test suite passes for me with TEST=ipodbgopt.

The reason is given in the comment your patch deletes.  Having debug  
info affect the codegen is pretty bad, because you get situations  
where a bug goes away when you turn on debug info,  and you can't  
debug it.

TEST=ipodbgopt currently runs through -strip-debug-declare  
immediately, which would hide such cases.  Try it with that flag  
removed and I bet you'll see some failures.

> Thanks,
> Jay.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.globaldebug
Type: application/octet-stream
Size: 609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090601/1932907d/attachment.obj>
-------------- next part --------------
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

More information about the llvm-dev mailing list