Carlo Alberto Ferraris
2011-Jun-24 14:14 UTC
[LLVMdev] Missing symbols in pass stack trace
I'm working on a pass (both LLVM and the pass have been compiled in debug+asserts mode) but when the pass crashes in the stack trace printed by opt the names of the functions inside my pass don't appear (see frames 14-16). How can I have them displayed?> cafxx at ubuntu:~/Projects/llvm2/Debug+Asserts/bin$ clear && ./opt > -load=CGF.so -cgf -debug test.S > [...] > While deleting: i32 % > Use still stuck around after Def is destroyed: ret i32 <badref> > opt: Value.cpp:76: virtual llvm::Value::~Value(): Assertion > `use_empty() && "Uses remain when a value is destroyed!"' failed. > 0 opt 0x0000000000d75265 > 1 opt 0x0000000000d75061 > 2 libpthread.so.0 0x00007f640c60bc60 > 3 libc.so.6 0x00007f640b8f6d05 gsignal + 53 > 4 libc.so.6 0x00007f640b8faab6 abort + 390 > 5 libc.so.6 0x00007f640b8ef7c5 __assert_fail + 245 > 6 opt 0x0000000000d1b287 llvm::Value::~Value() + 393 > 7 opt 0x0000000000c18b67 llvm::User::~User() + 99 > 8 opt 0x0000000000cc9ee2 > llvm::Instruction::~Instruction() + 114 > 9 opt 0x0000000000ccbf68 llvm::CallInst::~CallInst() + 58 > 10 opt 0x0000000000ccbf9a llvm::CallInst::~CallInst() + 24 > 11 opt 0x00000000008db456 > llvm::ilist_node_traits<llvm::Instruction>::deleteNode(llvm::Instruction*) > + 42 > 12 opt 0x00000000008d9ffd llvm::iplist<llvm::Instruction, > llvm::ilist_traits<llvm::Instruction> > >::erase(llvm::ilist_iterator<llvm::Instruction>) + 43 > 13 opt 0x0000000000cca004 > llvm::Instruction::eraseFromParent() + 66 > *14 CGF.so 0x00007f640b6a0042 > 15 CGF.so 0x00007f640b69f7c3 > 16 CGF.so 0x00007f640b6a24fd* > 17 opt 0x0000000000cf75f2 > llvm::MPPassManager::runOnModule(llvm::Module&) + 456 > 18 opt 0x0000000000cf7ae7 > llvm::PassManagerImpl::run(llvm::Module&) + 125 > 19 opt 0x0000000000cf7ef5 > llvm::PassManager::run(llvm::Module&) + 39 > 20 opt 0x00000000008b33e3 main + 4434 > 21 libc.so.6 0x00007f640b8e1eff __libc_start_main + 255 > 22 opt 0x00000000008a3ec9 > Stack dump: > 0. Program arguments: ./opt -load=CGF.so -cgf -debug test.S > 1. Running pass 'CGF' on module 'test.S'.-- Carlo Alberto Ferraris <cafxx at strayorange.com <mailto:cafxx at strayorange.com>> website/blog <http://cafxx.strayorange.com> - +39 333 7643 235 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110624/74cb7938/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: cafxx.vcf Type: text/x-vcard Size: 233 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110624/74cb7938/attachment.vcf>
On Jun 24, 2011, at 10:14 AM, Carlo Alberto Ferraris wrote:> I'm working on a pass (both LLVM and the pass have been compiled in debug+asserts mode) but when the pass crashes in the stack trace printed by opt the names of the functions inside my pass don't appear (see frames 14-16). How can I have them displayed? >> cafxx at ubuntu:~/Projects/llvm2/Debug+Asserts/bin$ clear && ./opt -load=CGF.so -cgf -debug test.S >> [...] >> While deleting: i32 % >> Use still stuck around after Def is destroyed: ret i32 <badref> >> opt: Value.cpp:76: virtual llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a value is destroyed!"' failed. >> 0 opt 0x0000000000d75265 >> 1 opt 0x0000000000d75061 >> 2 libpthread.so.0 0x00007f640c60bc60 >> 3 libc.so.6 0x00007f640b8f6d05 gsignal + 53 >> 4 libc.so.6 0x00007f640b8faab6 abort + 390 >> 5 libc.so.6 0x00007f640b8ef7c5 __assert_fail + 245 >> 6 opt 0x0000000000d1b287 llvm::Value::~Value() + 393 >> 7 opt 0x0000000000c18b67 llvm::User::~User() + 99 >> 8 opt 0x0000000000cc9ee2 llvm::Instruction::~Instruction() + 114 >> 9 opt 0x0000000000ccbf68 llvm::CallInst::~CallInst() + 58 >> 10 opt 0x0000000000ccbf9a llvm::CallInst::~CallInst() + 24 >> 11 opt 0x00000000008db456 llvm::ilist_node_traits<llvm::Instruction>::deleteNode(llvm::Instruction*) + 42 >> 12 opt 0x00000000008d9ffd llvm::iplist<llvm::Instruction, llvm::ilist_traits<llvm::Instruction> >::erase(llvm::ilist_iterator<llvm::Instruction>) + 43 >> 13 opt 0x0000000000cca004 llvm::Instruction::eraseFromParent() + 66 >> 14 CGF.so 0x00007f640b6a0042 >> 15 CGF.so 0x00007f640b69f7c3 >> 16 CGF.so 0x00007f640b6a24fd >> 17 opt 0x0000000000cf75f2 llvm::MPPassManager::runOnModule(llvm::Module&) + 456 >> 18 opt 0x0000000000cf7ae7 llvm::PassManagerImpl::run(llvm::Module&) + 125 >> 19 opt 0x0000000000cf7ef5 llvm::PassManager::run(llvm::Module&) + 39 >> 20 opt 0x00000000008b33e3 main + 4434 >> 21 libc.so.6 0x00007f640b8e1eff __libc_start_main + 255 >> 22 opt 0x00000000008a3ec9 >> Stack dump: >> 0. Program arguments: ./opt -load=CGF.so -cgf -debug test.S >> 1. Running pass 'CGF' on module 'test.S'. >Looks like your shared library is not being compiled with symbols. Did you verify that your sources are compiled with -g?> > -- > Carlo Alberto Ferraris <cafxx at strayorange.com> > website/blog - +39 333 7643 235 > <cafxx.vcf>_______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdevThanks, Justin Holewinski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110624/75baa885/attachment.html>
Carlo Alberto Ferraris
2011-Jun-24 14:34 UTC
[LLVMdev] Missing symbols in pass stack trace
> Looks like your shared library is not being compiled with symbols. > Did you verify that your sources are compiled with -g?I think so, this is the makefile (based on the one in the Hello pass):> LEVEL = ../../.. > LIBRARYNAME = CGF > LOADABLE_MODULE = 1 > USEDLIBS > > ifneq ($(REQUIRES_RTTI), 1) > ifneq ($(REQUIRES_EH), 1) > EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/CGF.exports > endif > endif > > include $(LEVEL)/Makefile.commonand this is the invocation:> cafxx at ubuntu:~/Projects/llvm2/lib/Transforms/cgf$ make > llvm[0]: Compiling CGFPass.cpp for Debug+Asserts build (PIC) > llvm[0]: Linking Debug+Asserts Loadable Module CGF.so-- Carlo Alberto Ferraris <cafxx at strayorange.com <mailto:cafxx at strayorange.com>> website/blog <http://cafxx.strayorange.com> - +39 333 7643 235 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110624/07611ccf/attachment.html>