[LLVMdev] Is there a way to verify that debug info metadata are correct ?

David Blaikie dblaikie at gmail.com
Mon Feb 11 09:42:24 PST 2013


On Thu, Feb 7, 2013 at 3:12 AM, Sebastien DELDON-GNB
<sebastien.deldon at st.com> wrote:
> Hi all,
>
> I'm using my own front-end that generates LLVM debug info metadata. I was using LLVM 2.9 debug version and I'm moving to LLVM 3.2 debug version of metadata.

If at all possible please migrate to using the DIBuilder interface.
I'm trying to port DragonEgg over to DIBuilder at the moment with the
intent that once that happens I'll be able to freely modify the debug
info metadata schema by modifying DIBuilder without concern for other
clients creating debug info metadata separately.

- David

> On my example I got llc 3.2 to fail on following assertion:
>
>
> llc: /work1/tools/llvm/3.2/sources/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1471: void llvm::DwarfDebug::endFunction(const llvm::MachineFunction*): Assertion `TheCU && "Unable to find compile unit!"' failed.
> 0  llc             0x0000000000ffb43f
> 1  llc             0x0000000000ffd6ba
> 2  libpthread.so.0 0x00007f5dd70238f0
> 3  libc.so.6       0x00007f5dd6312a75 gsignal + 53
> 4  libc.so.6       0x00007f5dd63165c0 abort + 384
> 5  libc.so.6       0x00007f5dd630b941 __assert_fail + 241
> 6  llc             0x0000000000b22f20 llvm::DwarfDebug::endFunction(llvm::MachineFunction const*) + 3232
> 7  llc             0x0000000000b0ea9b llvm::AsmPrinter::EmitFunctionBody() + 3291
> 8  llc             0x0000000000895f1d
> 9  llc             0x0000000000f995cd llvm::FPPassManager::runOnFunction(llvm::Function&) + 557
> 10 llc             0x0000000000f996b3 llvm::FPPassManager::runOnModule(llvm::Module&) + 51
> 11 llc             0x0000000000f99141 llvm::MPPassManager::runOnModule(llvm::Module&) + 497
> 12 llc             0x0000000000f992bb llvm::PassManagerImpl::run(llvm::Module&) + 171
> 13 llc             0x000000000052feb2 main + 5778
> 14 libc.so.6       0x00007f5dd62fdc4d __libc_start_main + 253
> 15 llc             0x000000000052bc29
> Stack dump:
> 0.      Program arguments: /home/deldon/Work/dev/pgi/linux86/share/llvm/3.2/bin/llc localvar2.ll -march=x86 -o localvar2.s
> 1.      Running pass 'Function Pass Manager' on module 'localvar2.ll'.
> 2.      Running pass 'X86 AT&T-Style Assembly Printer' on function '@foo'
>
>
> To me debug metadata, I'm generating, seem correct, but I can't find why this assert is happening.
> Is there any way to verify that metadata are correct ?
>
> 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



More information about the llvm-dev mailing list