Hi all, I was wondering if there is a way to check that metadata emitted in an LLVM file are corrects with respect to debug informations. My problem is that I emit 'metadata' in an .ll file and then using 'llc' there is no debug information emitted in final assembly. For now I limit metadata to routines/subprogram/file/block descriptors, is this the problem ? Thanks for your help Best Regards Seb -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111216/93f30100/attachment.html>
On Dec 16, 2011, at 8:05 AM, Seb wrote:> Hi all, > > I was wondering if there is a way to check that metadata emitted in an LLVM file are corrects with respect to debug informations.Right now there is no such check. In fact, 'llc' is trained to silently ignore malformed debug information, because 'opt' is not held reliable to maintain debug info. That said, it would be valuable to write such verification pass.> My problem is that I emit 'metadata' in an .ll file and then using 'llc' there is no debug information emitted in final assembly. > For now I limit metadata to routines/subprogram/file/block descriptors, is this the problem ?It is hard to guess with limited info. Probably it is easier to just single step in llc (DwarfDebug.cpp) and understand what is missing. - Devang> > Thanks for your help > Best Regards > Seb > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Hi Devang, Thanks for the answer, I eventually found that in DW_TAG_compile_unit metadata, if field for 'main' compile unit is set to false then no debug info is generated. Can someone explain what is the meaning of this field ? You wrote: "Right now there is no such check. In fact, 'llc' is trained to silently ignore malformed debug information, because 'opt' is not held reliable to maintain debug info. That said, it would be valuable to write such verification pass." Does this means that after opt metadata are not reliable at all ? Best Regards Seb -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120102/0cfd1e0f/attachment.html>