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

Sebastien DELDON-GNB sebastien.deldon at st.com
Thu Feb 7 03:12:27 PST 2013


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.
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




More information about the llvm-dev mailing list