[LLVMdev] Next round of DWARF issues/questions
Devang Patel
dpatel at apple.com
Mon Nov 29 16:42:52 PST 2010
On Nov 25, 2010, at 6:08 PM, Talin wrote:
> Also, there's another issue I wanted to mention: I have noticed that debugging and inlining don't play very well together. Even if other optimizations are disabled, if I turn on inlining, I get null pointer errors in this piece of code in DwarfDebug::constructInlinedScopeDIE():
> if (!Scope->getScopeNode())
> return NULL;
> DIScope DS(Scope->getScopeNode());
> DIE *ScopeDIE = new DIE(dwarf::DW_TAG_inlined_subroutine);
>
> DISubprogram InlinedSP = getDISubprogram(DS);
> CompileUnit *TheCU = getCompileUnit(InlinedSP);
> DIE *OriginDIE = TheCU->getDIE(InlinedSP);
> assert(OriginDIE && "Unable to find Origin DIE!");
> addDIEEntry(ScopeDIE, dwarf::DW_AT_abstract_origin,
> dwarf::DW_FORM_ref4, OriginDIE);
> What's happening is that InlinedSP.DbgNode is NULL, which causes getCompileUnit() to assert.
Please file a bugzilla PR with a reproduce testcase. A small LLVM IR which I can feed to llc to reproduce this crash should be good enough.
Thanks,
-
Devang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101129/18e9dae6/attachment.html>
More information about the llvm-dev
mailing list