[LLVMdev] Function "llvm::PassManager::run" not defined.

Mehdi Amini mehdi.amini at apple.com
Sun Jun 28 21:58:07 PDT 2015


Hi,

The break command I gave you solve your problem. But now you are not running the right “run” command, it seems to me that you missed the -load option.

— 
Mehdi

> On Jun 28, 2015, at 9:55 PM, Manideepa Mukherjee <manideepa.mukherjee at gmail.com> wrote:
> 
> Hi,
> 
> I tried with this command you suggested and I am getting the following output. 
> I have followed the command given on the tutorial exactly. 
> 
> Reading symbols from opt...done.
> (gdb) break llvm::legacy::PassManager::run
> Breakpoint 1 at 0x1899ac4: file LegacyPassManager.cpp, line 1746.
> (gdb) run /home/manideepa/Desktop/research/compiler/testing/matmul.bc ../lib/loop_graph_analysis.so -loop-graph-analysis
> Starting program: /home/manideepa/Desktop/research/compiler/llvm-3.4/Debug+Asserts/bin/opt /home/manideepa/Desktop/research/compiler/testing/matmul.bc ../lib/loop_graph_analysis.so -loop-graph-analysis
> warning: the debug information found in "/lib64/ld-2.19.so <http://ld-2.19.so/>" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
> 
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Traceback (most recent call last):
>   File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py <http://so.6.0.19-gdb.py/>", line 63, in <module>
>     from libstdcxx.v6.printers import register_libstdcxx_printers
> ImportError: No module named 'libstdcxx'
> opt: Unknown command line argument '-loop-graph-analysis'.  Try: '/home/manideepa/Desktop/research/compiler/llvm-3.4/Debug+Asserts/bin/opt -help'
> opt: Did you mean '-combiner-alias-analysis'?
> opt: Too many positional arguments specified!
> Can specify at most 1 positional arguments: See: /home/manideepa/Desktop/research/compiler/llvm-3.4/Debug+Asserts/bin/opt -help
> [Inferior 1 (process 4282) exited with code 01]
> 
> 
> 
> On Sat, Jun 27, 2015 at 2:23 AM, Mehdi Amini <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>> wrote:
> I wonder if it is not linked to the work on the new PassManager.
> 
> Can you try: break llvm::legacy::PassManager::run
> 
> 
>> Mehdi
> 
> 
> 
> 
> 
>> On Jun 26, 2015, at 3:54 AM, Manideepa Mukherjee <manideepa.mukherjee at gmail.com <mailto:manideepa.mukherjee at gmail.com>> wrote:
>> 
>> Hi,
>> 
>> I am trying to use GDB for debugging my llvm pass. I am following the documentation http://llvm.org/docs/WritingAnLLVMPass.html <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_docs_WritingAnLLVMPass.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=5-XncfQlc7dFtxPaBLgmnmyWuvZMhrLR_5nxoY-JD20&s=SrFgJEHbETmgWTO9pAyW4ScBlT2tCBFGhzZG-Oi2ArI&e=>. When i am doing this the following error and warning messages I am getting. I tried to remove the warning by apt-get install libc6-dbg:i386 command for updating the libc6 but still getting the same.
>> 
>> 
>> Copyright (C) 2014 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html <https://urldefense.proofpoint.com/v2/url?u=http-3A__gnu.org_licenses_gpl.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=5-XncfQlc7dFtxPaBLgmnmyWuvZMhrLR_5nxoY-JD20&s=Ep446hA7wQRsTjv1t574ZJPcMZcSsdW5bjINFITURiY&e=>>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "x86_64-linux-gnu".
>> Type "show configuration" for configuration details.
>> For bug reporting instructions, please see:
>> <http://www.gnu.org/software/gdb/bugs/ <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.gnu.org_software_gdb_bugs_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=5-XncfQlc7dFtxPaBLgmnmyWuvZMhrLR_5nxoY-JD20&s=G4kwCxGBA22DZLQoPOUkKgOjNILKTCcJuRzexkKw4AA&e=>>.
>> Find the GDB manual and other documentation resources online at:
>> <http://www.gnu.org/software/gdb/documentation/ <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.gnu.org_software_gdb_documentation_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=5-XncfQlc7dFtxPaBLgmnmyWuvZMhrLR_5nxoY-JD20&s=ojC9hyXiSd1pdyzEXwPZRf1s0PmBSObc13sgnXTRBDA&e=>>.
>> For help, type "help".
>> Type "apropos word" to search for commands related to "word"...
>> Reading symbols from opt...done.
>> (gdb) break llvm::PassManager::run
>> Function "llvm::PassManager::run" not defined.
>> Make breakpoint pending on future shared library load? (y or [n]) y
>> Breakpoint 1 (llvm::PassManager::run) pending.
>> (gdb) run /home/manideepa/Desktop/research/compiler/testing/matmul.bc -load ../lib/loop_graph_analysis.so -loop-graph-analysis
>> Starting program: /home/manideepa/Desktop/research/compiler/llvm-3.4/Debug+Asserts/bin/opt /home/manideepa/Desktop/research/compiler/testing/matmul.bc -load ../lib/loop_graph_analysis.so -loop-graph-analysis
>> warning: the debug information found in "/lib64/ld-2.19.so <https://urldefense.proofpoint.com/v2/url?u=http-3A__ld-2D2.19.so&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=5-XncfQlc7dFtxPaBLgmnmyWuvZMhrLR_5nxoY-JD20&s=j9h7o6iT8vs2f4Zwg0MvOTTzy9W4RGmgnKTrAVUfYOA&e=>" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
>> 
>> [Thread debugging using libthread_db enabled]
>> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>> Traceback (most recent call last):
>>   File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py <https://urldefense.proofpoint.com/v2/url?u=http-3A__so.6.0.19-2Dgdb.py&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=5-XncfQlc7dFtxPaBLgmnmyWuvZMhrLR_5nxoY-JD20&s=4HhOrnW1627N3ncHlbgzg-buq5jS5WbPhtR2pajO4Rg&e=>", line 63, in <module>
>>     from libstdcxx.v6.printers import register_libstdcxx_printers
>> ImportError: No module named 'libstdcxx'
>> WARNING: You're attempting to print out a bitcode file.
>> This is inadvisable as it may cause display problems. If
>> you REALLY want to taste LLVM bitcode first-hand, you
>> can force output with the `-f' option.
>> 
>> opt: loop_graph_new.cpp:245: void <anonymous namespace>::LoopGraphAnalysisPass::AddDataEdges(llvm::Loop *, unsigned int): Assertion `loopGraph != graphs.end()' failed.
>> 
>> Program received signal SIGABRT, Aborted.
>> 0x00007ffff69c7cc9 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
>> 56    ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
>> 
>> Please help.
>> 
>> 
>> 
>> -- 
>> Thanks & Regards,
>> Manideepa
>> 
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>         http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/>
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev <http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
> 
> 
> 
> 
> -- 
> Thanks & Regards,
> Manideepa Mukherjee
> Contact No:- +91-7428062726

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150628/44d23b46/attachment.html>


More information about the llvm-dev mailing list