我正在尝试使用gdb调试LLVM传递。
我先做gdb usr/bin/opt
,然后再做
run opt -load ~/llvm/build/lib/LLVMHello.so -hello < ~/llvm examples/trial.bc > /dev/null
现在这给出了错误 - &gt;
Starting program: /usr/bin/opt opt -load ~/llvm/build/lib/LLVMHello.so -hello < ~/llvm examples/trial.bc > /dev/null
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
opt: Too many positional arguments specified!
Can specify at most 1 positional arguments: See: /usr/bin/opt -help
[Inferior 1 (process 8000) exited with code 01]
(gdb)
任何帮助都将不胜感激。
答案 0 :(得分:0)
运行opt
时无需指定usr/bin/opt
,请尝试
run -load ~/llvm/build/lib/LLVMHello.so -hello < ~/llvm examples/trial.bc > /dev/null