<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Joe,<div><br><div><div>On Dec 28, 2011, at 7:51 PM, Joe Groff wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><font color="#222222" face="arial, sans-serif"><span style="white-space:nowrap">Hi everybody. I'm trying to use DIBuilder to emit debug information, but in the generated metadata, it appears that references to the compilation unit are being left null. </span></font></blockquote><div><br></div><div>Are you using DIBuilder.finalize() in the end ?</div><div>-</div><div>Devang</div><br><blockquote type="cite"><font color="#222222" face="arial, sans-serif"><span style="white-space:nowrap">The llvm.dbg.sp node also fails to get generated. Other than these missing pieces, the metadata looks otherwise correct. I am calling DIBuilder::finalize. When I try to inspect variables in GDB, it replies:</span></font><div>
<font color="#222222" face="arial, sans-serif"><span style="white-space:nowrap"><br></span></font></div><div><font color="#222222" face="arial, sans-serif"><span style="white-space:nowrap"><div>(gdb) print x</div><div>Unable to access variable "x"</div>
<div>$1 = <variable optimized away by compiler></div><div><br></div><div>This ring any bells with anyone? Let me know if you need more information. Thanks.</div><div><br></div><div>-Joe</div></span></font></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></div></body></html>